<template> <div class="pin-star"> <input type="checkbox" class="pin-leaf-checkbox"> <div class="pin-star-leaf"> </div> <div class="pin-star-leaf"> </div> <div class="pin-star-leaf"> </div> <div class="pin-star-leaf"> </div> <div class="pin-star-leaf"> </div> <div class="pin-star-center"> </div> </div> </template> <style lang="stylus" rel="stylesheet/stylus" scoped> .pin-star{ position: relative width: 300px height: 300px } .pin-leaf-checkbox, .pin-star-center { width: 45px; height: 50px; position: absolute; left: 0; right: 0; top: -60px; bottom: 0; margin: auto; background-color: #fff; border-radius: 50%; cursor: pointer; z-index: 999 } .pin-star-center, .pin-star-leaf{ pointer-events: none; } .pin-star-center > input[type="checkbox"]{ width: 100%; height: 100%; cursor: pointer; } .pin-star-leaf { width: 60px height: 120px background-color: #b8f0f5 border-radius: 50%/30% 30% 70% 70% position: absolute left: 0 right: 0 top: 0 bottom: 0 margin: auto opacity: 0.5 transition: transform 1s cubic-bezier(.8,-.5,.2,1.4); transform-origin: 30px 30px &:nth-of-type(1) { background-color: #B8F0F5 } &:nth-of-type(2) { background-color: #9CF3DC } &:nth-of-type(3) { background-color: #94F3B0 } &:nth-of-type(4) { background-color: #C2F8A1 } &:nth-of-type(5) { background-color: #FFEFAF } } .pin-leaf-checkbox:checked ~ .pin-star-leaf{ transition: transform 1s cubic-bezier(.8,-.5,.2,1.4); } .pin-leaf-checkbox:checked ~ .pin-star-leaf:nth-of-type(5){ transform: rotatez(35deg); } .pin-leaf-checkbox:checked ~ .pin-star-leaf:nth-of-type(4){ transform: rotatez(105deg); } .pin-leaf-checkbox:checked ~ .pin-star-leaf:nth-of-type(3){ transform: rotatez(180deg); } .pin-leaf-checkbox:checked ~ .pin-star-leaf:nth-of-type(2){ transform: rotatez(255deg); } .pin-leaf-checkbox:checked ~ .pin-star-leaf:nth-of-type(1){ transform: rotatez(325deg); } </style>
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697css3 花瓣按钮
来源:
时间:2024-11-21 23:27最新推荐文章于 2024-06-20 09:34:34 发布
BenjaminShih 于 2017-08-03 13:44:02 发布
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
相关知识
教师节花瓣图片
美容花瓣图片
CSS3中常用字体图标库总结
按钮免抠元素
花瓣app使用方法
怎么使用花瓣支付
html5css3玫瑰花
开门按钮套什么定额啊 这个可以吗
花瓣app下载
花瓣采集工具
网址: css3 花瓣按钮 https://www.huajiangbk.com/newsview643358.html
上一篇: 3DMAX制作逼真的玫瑰花的实例 |
下一篇: python花瓣长度和花瓣宽度散 |
推荐分享

- 1君子兰什么品种最名贵 十大名 4012
- 2世界上最名贵的10种兰花图片 3364
- 3花圈挽联怎么写? 3286
- 4迷信说家里不能放假花 家里摆 1878
- 5香山红叶什么时候红 1493
- 6花的意思,花的解释,花的拼音 1210
- 7教师节送什么花最合适 1167
- 8勿忘我花图片 1103
- 9橄榄枝的象征意义 1093
- 10洛阳的市花 1039
分享热点排名