鼠标悬停展示二维码

其实这真的是很简单的一个代码,但是百度搜一下觉得展示出来的那些一个比一个复杂。文章源自原紫番博客-https://www.yuanzifan.com/54352.html

而且有的还是CSS3以及HTML5之前时代的代码。文章源自原紫番博客-https://www.yuanzifan.com/54352.html

代码如下,HTML部分:文章源自原紫番博客-https://www.yuanzifan.com/54352.html

  1. <!-- 自己加的页脚微信展示开始 -->
  2. <a id="weixin" href="javascript:void(0)">
  3. <i class="fa fa-weixin"></i>
  4. <img src="http://你的路径/qrcode.jpg">
  5. </a>
  6. <!-- 自己加的页脚微信展示结束 -->

CSS部分:文章源自原紫番博客-https://www.yuanzifan.com/54352.html

  1. a#weixin {
  2. position: relative;
  3. }
  4. #weixin img {
  5. visibility: hidden;
  6. opacity: 0;
  7. transform: translate(0, 10px);
  8. transition: all 0.3s ease-in-out;
  9. position: absolute;
  10. right: -30px;
  11. bottom: 40px;
  12. width: 150px;
  13. height: 150px;
  14. }
  15. #weixin:hover img {
  16. visibility: visible;
  17. transform: translate(0, 0px);
  18. opacity: 1;
  19. }
文章源自原紫番博客-https://www.yuanzifan.com/54352.html文章源自原紫番博客-https://www.yuanzifan.com/54352.html
站长微信
扫码添加(注明来意)
weinxin
Yuanzifan99
原梓番博客公众号
博客内容精选
weinxin
原梓番博客
 

发表评论

匿名网友
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:
确定

拖动滑块以完成验证
加载中...