• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

Vue实现按钮旋转和移动位置的实例代码

vue 搞代码 4年前 (2022-01-08) 47次浏览 已收录 0个评论

这篇文章主要介绍了Vue实现按钮旋转和移动位置的实例代码,非常不错,具有一定的参考借鉴价值,需要的朋友可以参考下

1.静态效果图

Chrom移动端浏览模式下可拖动按钮处于任意位置,并且点击可旋转按钮

2.代码

  <div id="app"> <div class="icon-add-50"></div></div> #app { font-family: 'Avenir', Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-align: center; color: #2c3e50; margin-top: 60px; } /*加号*/ .icon-add-50{ position: relative; box-sizing: border-box; width: 50px; height: 50px; border: 2px solid gray; border-radius: 50%; box-shadow:darkgrey 0px 0px 2px 2px; background-color: CornflowerBlue; } .icon-add-50:before{ content: ''; position: absolute; width: 30px; height: 2px; left: 50%; top: 50%; margin-left: -15px; margin-top: -1px; background-color: white; } .icon-add-50:after{ content: ''; position: absolute; width: 2px; height: 30px; left: 50%; top: 50%; margin-left: -1px; margin-top: -15px; background-color: white; } 

总结

以上所述是小编给大家介绍的Vue实现按钮旋转和移动位置的实例代码,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对gaodaima搞代码网网站的支持!

以上就是Vue实现按钮旋转和移动位置的实例代码的详细内容,更多请关注gaodaima搞代码网其它相关文章!本文来源gao@daima#com搞(%代@#码@网2


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:Vue实现按钮旋转和移动位置的实例代码
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址