RcBuilder@walla.com
call centre: 054-5614020

draw Menu Triangle using HTML5 Canvas

Posted by: RcBuilder  /   Category: bind event / body / Canvas / CSS / css / div / header / HTML / HTML 5 / JAVASCRIPT / jQuery / lists / offset / onload event / section   /   No Comments
12
Oct
2014

draw Menu Triangle using HTML5 Canvas Style <style type="text/css"> body{background-color:#333;} header{ background-color:pink; height:200px; padding-top:50px;} ul{ padding:0px; margin:0px; list-style:none;} ul li{ float:left; width:100px; } ul li a { display:block; width:100%; height:100%; cursor:pointer; text-align:center; } section{ position:relative;} canvas#triangle{ position:absolute; top:-20px; } </style> Latest jQuery <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> Scripts <script type="text/javascript"> function CreateTriangle() { var context = $('#triangle').get(0).getContext('2d'); var width = 20; var height = 20; context.beginPath(); context.moveTo(width / 2, 0); context.lineTo(width, height); context.lineTo(0, height); context.closePath(); context.fillStyle = $('body').css('background-color'); context.fill(); } function MoveTo(a) { var left.

Read more
  • פיתוח מערכות
  • פתרונות טכנולוגים
  • קידום אתרים
  • בניית אתרים