• 简单的网站首页


    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>网站首页</title>
    <style type="text/css">
       body{background:url("images/bg.png") top center no-repeat;font-size:12px;font-family:宋体;color:#999999;}
       #main{960px;margin:0 auto;}
       .wb{84px;height:20px;}
       header span{margin-left:250px;}
       header{margin-top:20px;}
       input[type="button"]{color:#999999;border:0px;56px;height:20px;}
       #content{960px;background-color:#FFFFFF;height:680px;margin-top:180px;opactiy:0.5;}
       nav{margin-left: 46px;}
       nav ul li{list-style:none;float:left;line-height:60px;height:60px;92px;font-family:微软雅黑;font-size:16px;color:#333333;}
       h1 span{margin-left:370px;font-family:宋体;font-size:12px;color:#999999;}
       h1{font-family:微软雅黑;font-size:16px;color:#ff6633;margin-left:46px;}
       #left{530px;float:left;height: 500px}
       /*#left ul li{500px;list-style:none;font-family:宋体;font-size:13px;color:#333333;line-height:200%;margin-left: 46px;}
       .rq{font-family:"宋体";font-size:13px;color:#cccccc;display:block;float:right;}*/
       .tp{margin-top:46px;margin-left:45px;}
       img[id="img2"]{margin-left:10px;}
       #right{float:left;380px;height:100px;}
       /*#right img{margin-left:50px;margin-top:20px;}*/
       #right h4{margin-left:180px;font-family:宋体;font-size:13px;color:#666666;}
      /* #right ul{margin-left: 50px;margin-top: 30px;}
       #right ul li{list-style:none;font-size:13px;color:#333333;line-height:180%;}*/
       footer img{margin-top:20px; 100%;position: relative;}
       #copy{text-align:center;margin-top: 10px;margin-right:300px;}
       a{
    				text-decoration: none;
    				display: block;
    			}
    nav	ul li ul {
    				display: none;
    				
    			}
    nav	ul li ul li{
    	float: none;
    	background-color:#FFFFFF;
    }
    *{
    		margin: 0px;
    		padding: 0px;
    	}
    	.slideBox {
      /*  margin:50px auto;*/
      margin-top: 10px;
      margin-left: 50px;
        300px;
        height:280px;
        box-shadow:2px 2px 10px #C38DD4;
        border-radius:20px;
        position:relative;
        overflow:hidden;
    }
    .slideBox ul {
        position:relative;
        2000px;}
    .slideBox ul li {
        float:left;
        300px;
        height:480px;
        position:relative;   
    }
    .spanBox {
        position:absolute;
        300px;
        height:20px;
        bottom:10px;
        left:80px;
    }
    .spanBox span {
        18px;
        height:18px;
        margin-left:5px;
        background-color:rgba(201,178,207,1.00);
        float:left;
        line-height:16px;
        text-align:center;
        text-shadow:2px 2px 2px #C5EBF0;
        font-family:cabin-sketch;
        font-size:15px;
    }
    .slideBox .spanBox .active {
        background-color:rgba(155,83,244,0.79);
        border:solid 1px #BEEBEC;
        border-radius:4px;
    }
    .prev {
        position:absolute;
        left:0px;
        top:320px;
        float:left;
        border-left:solid 1px rgba(251,245,246,1.00);
        opacity:0.5;
    }
    .next {
        15px;
        height:50px;
        position:absolute;
        right:0px;
        top:320px;
        float:right;
        border-right:solid 1px rgba(245,237,237,1.00);
        opacity:0.5
    }
    .notice ul li{list-style:none;font-family:宋体;font-size:13px;color:#333333;line-height:100%;margin-left: 50px;margin-top: 10px;}
    </style>
    <script type="text/javascript" src="jquery-3.2.1.js"></script>
    </head>
    <body>
        <div id="main">
    	   <header>
    	       <img src="images/logo.png">
    		   <span>班级个人:<input type="text" class="wb" id="name">
    		         密码:<input type="password" class="wb" id="mima">
    				 <input type="button" value="登陆" id="dl">
    				 <input type="button" value="注册" id="zc">
    		   </span>
    	   </header>
    	   <div id="content">
    	      <nav>
    		      <ul>
    			     <li onmouseover="showsubmenu(this)" onmouseout="hidesubmenu(this)"><a href="#">首页</a>
                      <ul>
    				<li><a href="#">栏目二</a></li>
    				<li><a href="#">栏目二</a></li>
    				<li><a href="#">栏目二</a></li>
    			     </ul>
    			     </li>
    				 <li onmouseover="showsubmenu(this)" onmouseout="hidesubmenu(this)"><a href="#">我们</a>
                    <ul>
    				<li><a href="#">栏目二</a></li>
    				<li><a href="#">栏目二</a></li>
    				<li><a href="#">栏目二</a></li>
    			     </ul>
    				 </li>
    				 <li onmouseover="showsubmenu(this)" onmouseout="hidesubmenu(this)"><a href="#">班级公告</a>
                     <ul>
    	   			<li><a href="#">栏目二</a></li>
    				<li><a href="#">栏目二</a></li>
    				<li><a href="#">栏目二</a></li>
    			     </ul>
    				 </li>
    				 <li onmouseover="showsubmenu(this)" onmouseout="hidesubmenu(this)"><a href="#">班级活动</a>
                     <ul>
    	   			<li><a href="#">栏目二</a></li>
    				<li><a href="#">栏目二</a></li>
    				<li><a href="#">栏目二</a></li>
    			     </ul>
    				 </li>
    				<li onmouseover="showsubmenu(this)" onmouseout="hidesubmenu(this)"><a href="#">班级荣誉</a>
                     <ul>
    	   			<li><a href="#">栏目二</a></li>
    				<li><a href="#">栏目二</a></li>
    				<li><a href="#">栏目二</a></li>
    			     </ul>
    				 </li>
    				 <li onmouseover="showsubmenu(this)" onmouseout="hidesubmenu(this)"><a href="#">学习交流</a>
                    <ul>
    				<li><a href="#">栏目二</a></li>
    				<li><a href="#">栏目二</a></li>
    				<li><a href="#">栏目二</a></li>
    			     </ul>
    				 </li>
    				 <li onmouseover="showsubmenu(this)" onmouseout="hidesubmenu(this)"><a href="#">男生区</a>
                     <ul>
    	   			<li><a href="#">栏目二</a></li>
    				<li><a href="#">栏目二</a></li>
    				<li><a href="#">栏目二</a></li>
    			     </ul>
    				 </li>
    				 <li onmouseover="showsubmenu(this)" onmouseout="hidesubmenu(this)"><a href="#">女生区</a>
                     <ul>
    	   			<li><a href="#">栏目二</a></li>
    				<li><a href="#">栏目二</a></li>
    				<li><a href="#">栏目二</a></li>
    			     </ul>
    				 </li>
    				<li onmouseover="showsubmenu(this)" onmouseout="hidesubmenu(this)"><a href="#">班级相册</a>
                     <ul>
    	   			<li><a href="#">栏目二</a></li>
    				<li><a href="#">栏目二</a></li>
    				<li><a href="#">栏目二</a></li>
    			     </ul>
    				 </li>
    			  </ul>
    		  </nav>
    		  <div>
    		      <img src="images/line.png">
    		  </div>
    		  <div id="left">
    		       <h1>班级公告<span>更多>></span></h1>
               <div id="load"></div>
    		       <!-- <ul>
    			      <li>机关分工会组织举办“教职工冬季健步走”比赛<span class="rq">2017-12-06</span></li>
    			      <li>我校在“全国百强暑期实践团队”评选活动中取得佳绩<span class="rq">2017-12-06</span></li>
    				  <li>我校“炫彩中医”短剧曲艺大赛决赛圆满落幕<span class="rq">2017-12-06</span></li>
    				  <li>我校2017年教职工乒乓球团体赛圆满落幕<span class="rq">2017-12-07</span></li>
    				  <li>谭备战教授为我校业余团校暨学生干部学习十九大培训班作主题讲座<span class="rq">2017-12-07</span></li>
    				  <li>我校在2017年郑东新区大学生志愿者防艾知识竞赛中获得一等奖<span class="rq">2017-12-08</span></li>
    				  <li>“绿橘子乐队rock演奏之夜”演唱会热火校园 <span class="rq">2017-12-08</span></li>
    				  <li>“我校举办“校园文化形象大使”选拔大赛 <span class="rq">2017-12-09</span></li>
    				  <li>我校加入全国中医药研究生创新发展联盟<span class="rq">2017-12-09</span></li>
    				  <li>我校82级校友王耀献荣获2017年顾氏和平奖 <span class="rq">2017-12-10</span></li>
    			   </ul>	 -->
                    <div class="tp">
    				   <img src="images/nan.png">
    				   <img src="images/nv.png" id="img2">
                    </div>				
    		  </div>		  
    		  <div id="right">
    		  	<h1>班级活动</h1>
    			   <div class="slideBox">
        <ul>
        <li><img src="images/0.png" alt="" width="300" height="280"/></li>
        <li><img src="images/1.gif" alt="" width="300" height="280"/></li>
        <li><img src="images/2.png" alt="" width="300" height="280"/></li>  
        </ul>
        <div class="spanBox">
        <span class="active">1</span>
        <span>2</span>
        <span>3</span>
        </div>
        <div class="prev"><img src="images/left_arrow.jpg" width="15" height="50" alt=""/></div>
        <div class="next"><img src="images/right_arrow.jpg" width="15" height="50" alt=""/></div>
    </div>
    <div class="notice">
    			   <ul>
    			      <li>关于召开三门峡市教育系统信息化建设的通知</li>
    				  <li>关于召开三门峡市教育系统信息化建设</li>
    				  <li>关于召开三门峡市教育系统信息化</li>
    				  <li>关于召开三门峡市教育系统信息化建设的通知</li>
    				  <li>关于召开三门峡市教育建设的通知</li>
    				  <li>关于召开三门峡市教育系统信息化建设的通知</li>
    			   </ul>
    		  </div>		  
    		   <footer>
    	          <div>
    		         <img src="images/bottom-line.png" width="960">
    		      </div>
    			  <div id="copy">
    			      主办:河南中医药大学2015级信息管理与信息系统班
    			  </div>
    	     </footer>		  
    	   </div>	  
    	</div> 
    	<script type="text/javascript">
    	function showsubmenu(li){
    		var submenu=li.getElementsByTagName("ul")[0];
    		submenu.style.display="block";
    	}
    	function hidesubmenu(li){
    		var submenu=li.getElementsByTagName("ul")[0];
    		submenu.style.display="none";
    	}
    </script>
    <script type="text/javascript">
    	
    	$(document).ready(function(){
         var slideBox = $(".slideBox");
         var ul = slideBox.find("ul");
         var oneWidth = slideBox.find("ul li").eq(0).width();
         var number = slideBox.find(".spanBox span");            //注意分号 和逗号的用法
         var timer = null;
         var sw = 0;                    
         //每个span绑定click事件,完成切换颜色和动画,以及读取参数值
         number.on("click",function (){
         $(this).addClass("active").siblings("span").removeClass("active");
         sw=$(this).index();
         ul.animate({
                "right":oneWidth*sw,    //ul标签的动画为向左移动;
                   });
         });
         //左右按钮的控制效果
         $(".next").stop(true,true).click(function (){
             sw++;
             if(sw==number.length){sw=0};
             number.eq(sw).trigger("click");
             });
        $(".prev").stop(true,true).click(function (){
            sw--;
            if(sw==number.length){sw=0};
            number.eq(sw).trigger("click");
            });
        //定时器的使用,自动开始
        timer = setInterval(function (){
            sw++;
            if(sw==number.length){sw=0};
            number.eq(sw).trigger("click");
            },2000);
        //hover事件完成悬停和,左右图标的动画效果
        slideBox.hover(function(){
            $(".next,.prev").animate({
                "opacity":1,
                },200);
            clearInterval(timer);
            },function(){
                $(".next,.prev").animate({
                    "opacity":0.5,
                    },500);
            timer = setInterval(function (){
            sw++;
            if(sw==number.length){sw=0};
            number.eq(sw).trigger("click");
            },2000);
                })  
    })
    </script>
    <script type="text/javascript">
      
      $(document).ready(function(){
          $.ajax({
              type:"get",
              url:"9.xml",
              dataType:"xml",
              timeout:1000,
              cache:false,//禁止缓存
              success:function(data){
                var frag=$("<ul/>");
                $(data).find("notice").each(function(){
                             var content=$(this).children("content");
                             var data=$(this).children("data");                      
                             content_value=content.text();
                             data_value=data.text();                     
                             frag.append("<li>"+content_value+"<span>"+data_value+"</span></li>");
                });           
                    frag.appendTo("#load");
                    $("#load ul li").css({
                      "list-style-type":"none",
                      "width":"500px",
                      "font-family":"宋体",
                      "font-size":"13px",
                      "color":"#333333",
                      "line-height":"200%",
                      "margin-left": "46px"
                      });
                          $("#load  span").css({
                           "font-family":"宋体",
                           "font-size":"13px",
                           "color":"#cccccc",
                           "float":"right"
                          });
              }
            });
          }) 
    </script>
    </body>
    

      

  • 相关阅读:
    OSPF协议原理
    TCPDUMP抓包方法
    latex:画图
    FrankWolf算法
    Three20 Navigation 迁移到TTTableViewController一直显示加载中的解决办法
    ipa在iTunes中没有图标
    iPhone应用提交AppStore时Application failed codesign verification问题的解决
    XCode4.5 iOS6 SDK 提交AppStore Validate各种错误的解决
    1.forEach():遍历数组,并为每个元素调用传入的函数; 举例:
    CSS实现单行、多行文本溢出显示省略号(…)
  • 原文地址:https://www.cnblogs.com/qfdy123/p/8151010.html
Copyright © 2020-2023  润新知