分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > IT知识

HTML+CSS鼠标悬停效果

发布时间:2023-09-06 01:08责任编辑:苏小强关键词:CSSHTML鼠标悬停

HTML+CSS实现鼠标悬停效果

HTML:

<link href="style.css" rel="stylesheet"><a class="social" href="https://webbb.be" target="_blank"> ????<div class="front"> ???????<i class="fa fa-facebook"></i> ????</div> ????<div class="back"> ???????<i class="fa fa-facebook"></i> ????</div></a><a class="social social-twitter" href="https://webbb.be" target="_blank"> ????<div class="front"> ???????<i class="fa fa-twitter"></i> ????</div> ????<div class="back"> ???????<i class="fa fa-twitter"></i> ????</div></a><a class="social social-github" href="https://webbb.be" target="_blank"> ????<div class="front"> ???????<i class="fa fa-github"></i> ????</div> ????<div class="back"> ???????<i class="fa fa-github"></i> ????</div></a><a class="social social-pinterest" href="https://webbb.be" target="_blank"> ????<div class="front"> ???????<i class="fa fa-pinterest"></i> ????</div> ????<div class="back"> ???????<i class="fa fa-pinterest"></i> ????</div></a><a class="social social-googleplus" href="https://webbb.be" target="_blank"> ????<div class="front"> ???????<i class="fa fa-google-plus"></i> ????</div> ????<div class="back"> ???????<i class="fa fa-google-plus"></i> ????</div></a><a class="social social-skype" href="https://webbb.be" target="_blank"> ????<div class="front"> ???????<i class="fa fa-skype"></i> ????</div> ????<div class="back"> ???????<i class="fa fa-skype"></i> ????</div></a><a class="social social-linkedin" href="https://webbb.be" target="_blank"> ????<div class="front"> ???????<i class="fa fa-linkedin"></i> ????</div> ????<div class="back"> ???????<i class="fa fa-linkedin"></i> ????</div></a><a class="social social-skype" href="https://webbb.be" target="_blank"> ????<div class="front"> ???????<i class="fa fa-skype"></i> ????</div> ????<div class="back"> ???????<i class="fa fa-skype"></i> ????</div></a><a class="social social-dribbble" href="https://webbb.be" target="_blank"> ????<div class="front"> ???????<i class="fa fa-dribbble"></i> ????</div> ????<div class="back"> ???????<i class="fa fa-dribbble"></i> ????</div></a>

CSS:

/** * CSS3 social icon hover effect * Read more on my blog: http://webbb.be/blog/ */body { ???background: #f06; ???background: linear-gradient(45deg, #f06, yellow); ???min-height: 100%;}a,a:visited { color: #fff; }a:hover { color: #fff; }.social { ???float: left; ???margin: 2em 2em; width: 100px; height: 100px; ????????display: block; text-align: center; line-height:103px; color: #fff; ???????position: relative; ???transform:rotateY(0deg); ???transition:transform .25s ease-out; ???transform-style:preserve-3d;}.social > div { ???width: 100px; height: 100px; background: #000; ???position: absolute; top: 0; left: 0; right: 0; bottom: 0;}.social >.front { ???transform:translateZ(40px);}.social >.back { ???background: #3B5998; font-size: 3em; ???transform:rotateY(-100deg) translateZ(40px);}/* ?Social Media Colors ????Facebook #3B5998 ???Flickr #FE0883 ???Foursquare #8FD400 ???Google+ #C63D2D ???Instagram #4E433C ???Linkedin #4875B4 ???Tumblr #2B4964 ???Twitter #33CCFF ???Vimeo #86B32D ???Youtube #FF3333 ???Dribbble #ea4c89*/.social.social-twitter > .back { background: #55ACEE; }.social.social-github > .back { background: #f3f3f3; color: #000; }.social.social-pinterest > .back { background: #e3262e; }.social.social-googleplus > .back { background: #dd4B39; }.social.social-skype > .back { background: #12A5F4; }.social.social-linkedin > .back { background: #4875B4; }.social.social-dribbble > .back { background: #ea4c89; }/* Hover */.social:hover { ???transform: rotateY(100deg);}

效果:

HTML+CSS鼠标悬停效果

原文地址:http://www.cnblogs.com/520future/p/7465286.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved