zoukankan      html  css  js  c++  java
  • UR官网特效

    <!DOCTYPE html>                              <!--申明文档类型:html-->

    <html lang="en">                               <!--html 根标签 language--en:english--'zh-CN'中文简体-->

    <head>                                              <!--网页头部-->

    <meta charset="UTF-8">                     <!--字符集:UTF-8编码--> 

    <meta name="Generator" content="EditPlus">

    <meta name="Author" content="千寻">                         <!--作者-->

    <meta name="Keywords" content="千寻博客,博客">        <!--关键词-->

    <meta name="Description" content="">                          <!--描述-->

    <title>UR官网特效</title>                                                               <!--网页标题-->

    </head>

    <!--css 层叠样式-->

    <style>

    *{/*通配符*/

    margin:0;                                     /*外边距*/

    padding:0;                                    /*内边距*/

    }

    #box{

    1017x;                                  /*宽:1018像素*/

    height:523px;                                 /*高:523像素*/

    border:1px solid red                        /*边框:边框大小 直线 颜色*/

    margin:100px auto;                        /*外边距:顶部距离*/

    position:relative;                            /*定位:相对定位*/

    }

    /*在页面当中有一个ID命名叫box的标签,下方ul*/

    #box ul{

          100%

          height:100%;

          border:1px solid red;

          position:absolute;                               /*定位:绝对定位 参考定位父级 */

          top:0;

    }

    #box ul li{

               list-style:none;/*列表样式:无*/

               float:left;/*左浮动*/

               337px;

               height:113px;

               border:1px solid white;

               position:relative;/**/

    }

    #box ul li p{

                /*

                    top等,方位词要与定位连用

                */

                position:absolute;

                top:10px;

                left:10px; 

                color:white;/*文字颜色*/

    }

    #box ul li .logo{

                80px;

        height:60px;

               position:relative;

               left:-40px;

               opacity:1;

    }

    #box ul li img{

           opacity:0;/*0完全透明 1完全不透明*/

    }

    </style>

    <body>                                                                    <!--网页主体:结构 可视化区域 双标签-->

         <div id="box">                                                     <!--父级-->

                <img width='100%' scr="images/bg1.jpg" />                        <!--img图片标签 src="路径"-->

                <ul id="oUL">                       <!--ul无序列表标签-->

                       <li>

              <img class="logo" width=100% scr="images/1.jpg" />

                                 <>

                       </li>

                       <li>

                               <img width=100% scr="images/2.jpg" />

                               <p>青春YOUTH</p>

                       </li>

                       <li>

                <img width=100% scr="images/3.jpg" />

                              <p>青春YOUTH</p>

                   </li>

                       <li>

              <img width=100% scr="images/4.jpg" />

                              <p>青春YOUTH</p>     

                       </li>

                       <li>

              <img width=100% scr="images/5.jpg" />

                     <p>青春YOUTH</p>

           </li>

                       <li>

              <img width=100% scr="images/6.jpg" />

              <p>青春YOUTH</p> 

          </li>

                       <li>

              <img width=100% scr="images/7.jpg" />

                      <p>青春YOUTH</p>

           </li>

                       <li>

               <img width=100% scr="images/8.jpg" />

               <p>青春YOUTH</p>       

           </li>

                       <li>

              <img width=100% scr="images/9.jpg" />

              <p>青春YOUTH</p>

           </li>

         </div>

    <script>

    /在文档中获取元素,通过ID名(“”)/

       //var oBox=document.getElementByID('box');

        //在文档中获取元素,通过标签

          var a=document.getElementsByTagName('img');

          var arr=['images/bg1','images/bg2.jpg'];//数组

          num=0;

          aImg[0].src=arr[num];

          setInterval(function(){

         num=num++;

        if(num==2){

              num=0;

              }

         aImg[0].src=arr[num];

    },2000);//定时器  每1000毫秒执行一次

    for(var i){

    aLi[i.onmouseover=function(){//鼠标滑入

           aLi[0].style.opacity=1;aLi

    }

    </script>

    </body>

    </html>

  • 相关阅读:
    2017第10周日
    关于能聊
    mybatis的$存在安全问题,为什么又不得不用?
    Cassandra的登录认证授权
    elasticsearch安装过程中的license问题解决办法
    配置ModSecurity防火墙与OWASP规则
    apache安装php7过程中遇到到段错误
    mac下apache启动关闭操作
    mac下firefox复制粘贴失效解决办法
    firefox和chrome对于favicon.ico关于content-security-policy的不同处理
  • 原文地址:https://www.cnblogs.com/think90/p/5747766.html
Copyright © 2011-2022 走看看