
样例
代码:
<style>
.circle{width:50pxheight:50pxmargin: 50px autoborder-radius:50%border:1px solid #f00}
</style>
<div class="circle"></div>
JQuery 我没试过 不过你可以写JS 的呀 使用settime 方法你知道在一个jquery("#buttom").click(function(){
var time =setTimeout(animate(),33)
})
var time ,radius =15
function creatCanvas()
{
var c=document.getElementById("myCanvas")
var cxt=c.getContext("2d")
cxt.fillStyle="#FF0000"
cxt.beginPath()
cxt.arc(70,18,radius ,0,Math.PI*2,true) //在这里半径是15
cxt.closePath()
cxt.fill()
}
funcation animate()
{
var radius +=2
if(radius >=100)
{
clearTimeout(time)
}
else
{
creatCanvas()
}
}
html5 label定长不随文字的多少改变大小,这个的话,我们是可以通过CSS来搞定的,设置label的width,height,那样他自然它的大小就不能被改变,这里我写一段代码:<html>
<head>
<style>
label{
width:300px
height:200px
}
</style>
</head>
<body>
<div>
<form>
<label for="male">Male</label>
<input type="radio" name="sex" id="male" />
<br />
<label for="female">Female</label>
<input type="radio" name="sex" id="female" />
</form>
</div>
</body>
</html>
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)