zoukankan      html  css  js  c++  java
  • 移动的光束

         <!DOCTYPE html>
         <html lang="en">
          
         <head>
         <meta charset="UTF-8">
         <meta name="viewport" content="width=device-width, initial-scale=1.0">
         <meta http-equiv="X-UA-Compatible" content="ie=edge">
         <title>Document</title>
         <style>
         .img {
         display: block;
         position: relative;
         width: 800px;
         height: 450px;
         margin: 0 auto;
         }
          
         .img:before {
         content: "";
         position: absolute;
          
         width: 100px;
         height: 120%;
          
          
         top: 0;
         /*初始位置*/
         left: -150px;
         overflow: hidden;
          
         /*控制背景色的渐变色*/
         background: -moz-linear-gradient(left, rgba(255, 255, 255, 0)0, rgba(255, 255, 255, .2)50%, rgba(255, 255, 255, 0)100%);
         background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(50%, rgba(255, 255, 255, .2)), color-stop(100%, rgba(255, 255, 255, 0)));
         background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0)0, rgba(255, 255, 255, .2)50%, rgba(255, 255, 255, 0)100%);
         background: -o-linear-gradient(left, rgba(255, 255, 255, 0)0, rgba(255, 255, 255, .2)50%, rgba(255, 255, 255, 0)100%);
          
         /*控制光束倾斜度*/
         -webkit-transform: skewX(-25deg);
         -moz-transform: skewX(-25deg)
          
         }
          
         .img:hover:before {
         left: 150%;
         transition: left 2s ease 0s;
         }
          
         </style>
         </head>
          
         <body>
         <a href="#" class="img"><img
         src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1508071812303&di=39df35e061f362e6cd1e1f432b6af0d9&imgtype=0&src=http%3A%2F%2Fwww.pp3.cn%2Fuploads%2F201505%2F2015062602.jpg" width="800">
         </a>
         </body>
          
         </html>
  • 相关阅读:
    函数传参-修改文本
    函数传参-商品计价
    嵌套选项卡自动播放
    仿淘宝自动播放菜单栏
    仿淘宝侧边栏菜单
    图片自动切换
    定时器应用-页面弹出广告
    转:Java面试题集(1-50)
    转:115个Java面试题和答案——终极列表(上)
    毕向东day01笔记--dos-jdk-jre-环境变量等
  • 原文地址:https://www.cnblogs.com/xuezizhenchengxuyuan/p/7672916.html
Copyright © 2011-2022 走看看