jqmobi 简单的圆形 按钮实现_源码
下图是实现的效果html代码
<div onclick="JavaScript:alert('我是蓝色的');" id="animate" class="icon location radio white" style=" width: 50px; height: 50px; border-radius: 50%;background: blue"></div>
<div onclick="JavaScript:alert('我是红色的');" id="animate1" class="icon home radio white" style="margin-top:-50px; margin-left:60px; width: 50px; height: 50px; border-radius: 50%;background: red"></div>
<div onclick="JavaScript:alert('我是绿色的');" id="animate2" class="icon phone radio white" style="margin-top:-50px; margin-left:120px; width: 50px; height: 50px; border-radius: 50%;background: rgb(149,215,0)"></div>css修改代码
在 /css/icons.css 中 插入如下代码
.icon.radio:before {
font-size:2em;
left:11px; top:10px;
}
.icon.white:before {
color:white;
}大家可以举一反三 图标的颜色可以替换 位置我是手动定位的 如果 觉得不对还可以调整
呃..好晚了。。洗洗睡了以后我也会发一些简单易懂的源码给大家分享 相互交流有助于提高嘛
{:4_86:}谢谢
页:
[1]