清风细雨楼 Design By www.eepep.com
之前为大家分享了很多款纯css3实现的实用按钮。今天给大家带来一款基于css3的动画按钮。实现的效果图如下:
实现的代码。
html代码:
XML/HTML Code复制内容到剪贴板- <div class="share-buttons">
- <div class="share-button">
- <div class="share-button-secondary">
- <div class="share-button-secondary-content">
- share on twitter
- </div>
- </div>
- <div class="share-button-primary">
- <i class="share-button-icon fa fa-twitter"></i>
- </div>
- </div>
- <div class="share-button">
- <div class="share-button-secondary">
- <div class="share-button-secondary-content">
- share on facebook
- </div>
- </div>
- <div class="share-button-primary">
- <i class="share-button-icon fa fa-facebook"></i>
- </div>
- </div>
- <div class="share-button">
- <div class="share-button-secondary">
- <div class="share-button-secondary-content">
- pin on pinterest
- </div>
- </div>
- <div class="share-button-primary">
- <i class="share-button-icon fa fa-pinterest"></i>
- </div>
- </div>
- <div class="share-button">
- <div class="share-button-secondary">
- <div class="share-button-secondary-content">
- share on tumblr
- </div>
- </div>
- <div class="share-button-primary">
- <i class="share-button-icon fa fa-tumblr"></i>
- </div>
- </div>
- <div class="share-button">
- <div class="share-button-secondary">
- <div class="share-button-secondary-content">
- share on google+
- </div>
- </div>
- <div class="share-button-primary">
- <i class="share-button-icon fa fa-google-plus"></i>
- </div>
- </div>
- </div>
css3代码:
CSS Code复制内容到剪贴板- body
- {
- background: -webkit-linear-gradient(0deg, #FF8008 10%, #FFC837 90%);
- background: linear-gradient(90deg, #FF8008 10%, #FFC837 90%);
- padding: 2em;
- text-align: center;
- }
- *
- {
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- }
- .share-buttons
- {
- position: absolute;
- width: 300px;
- height: 212px;
- padding-left: 135px;
- top: 50%;
- left: 50%;
- margin-left: -150px;
- margin-top: -106px;
- }
- .share-buttons .share-button
- {
- float: left;
- margin-top: 15px;
- }
- .share-buttons .share-button:first-child
- {
- margin-top: 0;
- }
- .share-buttons .share-button:after
- {
- clear: both;
- display: table;
- }
- .share-button
- {
- display: block;
- position: relative;
- height: 30px;
- }
- .share-button:hover
- {
- cursor: pointer;
- }
- .share-button:hover .share-button-primary
- {
- box-shadow: 1px 0 0 0 rgba(0, 0, 0, 0.1);
- }
- .share-button:hover .share-button-secondary-content
- {
- -webkit-transform: translate3d(0, 0, 0);
- transform: translate3d(0, 0, 0);
- }
- .share-button-primary
- {
- position: absolute;
- background: #fff;
- width: 30px;
- height: 30px;
- border-radius: 15px;
- left: 0;
- top: 50%;
- margin-top: -15px;
- }
- .share-button-icon
- {
- display: block;
- color: #242424;
- position: absolute;
- width: 30px;
- line-height: 30px;
- font-size: 16px;
- margin-top: 1px;
- }
- .share-button-secondary
- {
- overflow: hidden;
- margin-left: 15px;
- height: 30px;
- }
- .share-button-secondary-content
- {
- font-family: sans-serif;
- font-size: .75em;
- background: #fff;
- display: block;
- height: 30px;
- text-align: left;
- padding-left: 24px;
- padding-right: 18px;
- line-height: 30px;
- color: #242424;
- border-radius: 0 15px 15px 0;
- -webkit-transform: translate3d(-100%, 0, 0);
- transform: translate3d(-100%, 0, 0);
- -webkit-transition: -webkit-transform 175ms ease;
- transition: transform 175ms ease;
- }
相关推荐:
纯css3实现的动画按钮的实例教程
一款纯css3实现的颜色渐变按钮的代码教程
一款纯css3实现的鼠标经过按钮特效教程
利用css3实现的简单的鼠标悬停按钮
纯CSS3发光分享按钮的实现教程
五款漂亮的纯CSS3动画按钮的实例教程
清风细雨楼 Design By www.eepep.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
清风细雨楼 Design By www.eepep.com
暂无评论...
更新日志
2024年12月25日
2024年12月25日
- 小骆驼-《草原狼2(蓝光CD)》[原抓WAV+CUE]
- 群星《欢迎来到我身边 电影原声专辑》[320K/MP3][105.02MB]
- 群星《欢迎来到我身边 电影原声专辑》[FLAC/分轨][480.9MB]
- 雷婷《梦里蓝天HQⅡ》 2023头版限量编号低速原抓[WAV+CUE][463M]
- 群星《2024好听新歌42》AI调整音效【WAV分轨】
- 王思雨-《思念陪着鸿雁飞》WAV
- 王思雨《喜马拉雅HQ》头版限量编号[WAV+CUE]
- 李健《无时无刻》[WAV+CUE][590M]
- 陈奕迅《酝酿》[WAV分轨][502M]
- 卓依婷《化蝶》2CD[WAV+CUE][1.1G]
- 群星《吉他王(黑胶CD)》[WAV+CUE]
- 齐秦《穿乐(穿越)》[WAV+CUE]
- 发烧珍品《数位CD音响测试-动向效果(九)》【WAV+CUE】
- 邝美云《邝美云精装歌集》[DSF][1.6G]
- 吕方《爱一回伤一回》[WAV+CUE][454M]