.circular1{
width: 50px;
height: 30px;
border-radius: 16px;
background-color: #ccc;
transition: .3s;
cursor: pointer;
}
.round-button1{
width: 30px;
height: 30px;
background: #fff;
border-radius: 50%;
box-shadow: 0 1px 5px rgba(0,0,0,.5);
transition: .3s;
position: relative;
left:;
}
.round-button1:hover{
transform: scale(1.2);
box-shadow: 0 1px 8px rgba(0,0,0,.5);
}
<div class="circular1">
<div class="round-button1"></div>
</div>
$(function () {
$('.circular1').click(function () {
var left = $('.round-button1').css('left');
left = parseInt(left);
if (left == 0) {
$('.round-button1').css({'left': '22px', 'background-color': '#F00'});
$(this).css({'background-color': '#e7e7e7', 'box-shadow': '0 0 5px #999 inset'})
} else {
$('.round-button1').css({'left': '0', 'background-color': '#fff'}) }
})
})

最新文章

  1. [LeetCode] Pacific Atlantic Water Flow 太平洋大西洋水流
  2. jQuery静态方法parseXML使用和源码分析
  3. openssh/ntp/ftp漏洞
  4. selenium结合sikuliX操作Flash网页
  5. JS模块规范 前端模块管理器
  6. 转】从源代码剖析Mahout推荐引擎
  7. PHP全局变量
  8. cf C. Divisible by Seven
  9. 记一次解决curl https证书问题
  10. 监控gc
  11. vb6.0的各种SHELL,CMD内部命令、外部命令、SHELL任意文件
  12. CCF-201412-2-Z字形扫描
  13. IT运维如何防止陷入“中年油腻”和频繁被动地打“遭遇战”?
  14. Linux 用户打开进程数的调整
  15. 二.django项目环境搭建
  16. Android -- 贝塞尔曲线公式的推导和简单使用
  17. DP常用模板
  18. (7)Why 30 is not the new 20
  19. rpm_快速安装saltstake
  20. poj2387 Til the Cows Come Home(Dijkstra)

热门文章

  1. Select、Poll与Epoll比较
  2. linux中syscall调用号查看
  3. 双系统或三系统:Grub Rescue修复方法
  4. DB Query Analyzer 5.02 is distributed, 53 articles concerned have been published
  5. wait和notify的理解与使用
  6. 【备忘】Windows的命令行下设置网络代理
  7. 基类包括字段“ScriptManager1”,但其类型(System.Web.UI.ScriptManager)与控件(System.Web.UI.ScriptManager)的类型不兼容
  8. python爬虫错误总结
  9. mysql-入门
  10. C#读取shp文件并获取图形保存到sde要素类中(不使用ESRI的类库,纯c#实现)