目录
欢迎来到我的优快云主页!您的支持是我创作的动力!Web前端网页制作、网页完整代码、大学生期末大作业案例模板完整代码、技术交流等,有兴趣的联系我交流学习!更多优质博客文章、网页模板点击以下链接查阅:
5000+网页案例完整代码,主题涵盖30+种类型:
一、网页简介
本实例应用html5+css3+js: 导航菜单、图片轮翻、图片特效等。适用于大学生网页课程作业设计、公司网页制作等。本网页支持如Dreamweaver、HBuilder、Text 、Vscode 等任意html编辑软件进行编辑修改;支持包括IE、Firefox、Chrome、Safari主流浏览器浏览。
二、网页文件
本网页实例共包含6个页面:
三、网页效果
以下是本篇文章正文内容,下面案例仅供参考(节选示例):
四、代码展示
1.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>某某学校网站模板</title>
<mvc:annotation-driven enable-matrix-variables="true"></mvc:annotation-driven>
<context:component-scan base-package="com.th.action"></context:component-scan>
<mvc:default-servlet-handler/>
<link href="css/common.css" rel="stylesheet" type="text/css">
<link href="css/style.css" rel="stylesheet" type="text/css">
<!--<script type="text/javascript" src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>-->
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="js/jquery.SuperSlide2.js"></script>
<script type="text/javascript">
$(function(){
$('#index-news-focus').owlCarousel({
items: 1,
navigation: true,
navigationText: ["上一个","下一个"],
autoPlay: true,
stopOnHover: true
}).hover(function(){
$('.owl-buttons').show();
}, function(){
$('.owl-buttons').hide();
});
});
</script>
<!--下拉动画-->
<link rel="stylesheet" href="wow/animate.min.css"/>
<script type="text/javascript" src="wow/wow.min.js"></script>
<script>
if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))){
new WOW().init();
};
$(function(){
});
</script>
<!--下拉动画-->
</head>
<body>
<!--header S-->
<header>
<!--nav S-->
<nav>
<div class="top">
<div class="text">
<span class="l">欢迎光临某某学校网站!</span>
<span class="r">咨询电话:010-0000000</span>
</div>
</div>
<div class="hn-main">
<ul>
<li>
<a href="index.html">网站首页</a>
<a href="about.html">关于我们</a>
<a href="images-list.html">校园风采</a>
<a href="about.html">校园文化</a>
</li>
<a href="index.html" class="logo"><span><img src="images/logo.png"></span></a>
<li>
<a href="title-list.html">新闻资讯</a>
<a href="about.html">荣誉资质</a>
<a href="about.html">招生介绍</a>
<a href="contact.html">联系我们</a>
</li>
</ul>
</div>
</nav>
<!--nav E-->
<!---banner-content s--->
<div class="index-banner-slide">
<div class="banner-content">
<div class="banner-slide">
<div class="banner-slide-circle hd">
<ul>
<li class="on"></li>
<li></li>
<li></li>
</ul>
</div>
<div class="banner-slide-image bd">
<ul>
<li>
<a href="#">
<img src="images/banner1.jpg" alt="">
</a>
</li>
<li>
<a href="#">
<img src="images/banner2.jpg" alt="">
</a>
</li>
<li>
<a href="#">
<img src="images/banner3.jpg" alt="">
</a>
</li>
</ul>
</div>
</div>
<div class="banner-hidden">
<div class="banner-background-01"></div>
<div class="banner-background-02"></div>
</div>
</div>
</div>
<!---banner-content e--->
</header>
<!--header E-->
<!--index-news S-->
<div class="index-news">
<div class="in-text">
<h2>站内资讯</h2>
<a href=""><span>重磅!2019年保定主城区中小学招生划片方案出台!你想知道的都在这!</span><em>06/18</em></a>
<a href=""><span>布基纳法索总统出席中国援布100所小学项目开工仪式</span><em>06/18</em></a>
<a href=""><span>大山深处的小学老师:39年来培养200位学生走出大山</span><em>06/18</em></a>
<a href=""><span>北京小学入学不是难题,家门口多了不少好学校</span><em>06/18</em></a>
<a href=""><span>家长注意!南昌22所小学招生学区范围公布!今年有变</span><em>06/18</em></a>
<a href=""><span>今年九月将投入使用!金山小学新建项目已完成竣工验收</span><em>06/18</em></a>
<a href=""><span>合肥包河区学区出炉 2019年中小学招生方案发布(图)</span><em>06/18</em></a>
<a href=""><span>重要提醒!杭州公办、民办小学录取时间表来了</span><em>06/18</em></a>
</div>
<div class="in-text">
<h2>相关新闻</h2>
<a href=""><span>钱塘新区年度小学招生方案出炉,20余盘密集领证,新房供应开启火热</span><em>06/18</em></a>
<a href=""><span>青岛新建学校再传好消息!36班双山小学年底开建</span><em>06/18</em></a>
<a href=""><span>注意啦!金凤区中小学学区划片、入学办法来了!银川...</span><em>06/18</em></a>
<a href=""><span>小学教室也去“抖”? 人民日报 怒了</span><em>06/18</em></a>
<a href=""><span>明天开始,柯城区小学入学网上报名!这份操作手册不能不看~</span><em>06/18</em></a>
<a href=""><span>2019年社会学年会性别论坛 “回溯与前瞻</span><em>06/18</em></a>
<a href=""><span>渭南高新小学开展“文明 从排队礼让开始 ”系列教育活动</span><em>06/18</em></a>
<a href=""><span>中小学老师“阴盛阳衰”,校外培训机构却“阳盛阴衰”,原因为何</span><em>06/18</em></a>
</div>
<div class="in-flashbox">
<div class="focusNew_out flashlist">
<div class="f_out">
<span class="f_out_txt"><a href="http://www.17sucai.com/">忠庄镇忠庄小学乡村学校少年宫的孩子在学校练习口风琴</a></span>
<a href="http://www.17sucai.com/"><img alt="忠庄镇忠庄小学乡村学校少年宫的孩子在学校练习口风琴" src="images/01.jpg" /></a>
</div>
<div class="f_out">
<span class="f_out_txt"><a href="http://www.17sucai.com/">内马尔飞了起来</a></span>
<a href="http://www.17sucai.com/"><img alt="内马尔飞了起来" src="images/02.jpg" /></a>
</div>
<div class="f_out">
<span class="f_out_txt"><a href="http://www.17sucai.com/">曼朱基齐侧身凌空</a></span>
<a href="http://www.17sucai.com/"><img alt="曼朱基齐侧身凌空" src="images/03.jpg" /></a>
</div>
</div>
<div class="f_tabs">
<span class="hover">1</span>
<span>2</span>
<span>3</span>
</div>
</div>
</div>
<!--index-news E-->
<!--index-show S-->
<div class="index-show">
<div class="main">
<h2>校园风采</h2>
<!--下面是向左滚动代码-->
...
2.CSS
代码如下(节选示例):
@charset "utf-8";
/* CSS Document */
/**/
.index-news{
width:1240px;
height:auto;
overflow:hidden;
margin:0 auto 0 auto;
padding-top:622px;
}
/* in-flashbox */
.in-flashbox{width:460px;height:335px;overflow:hidden;position:relative; float:right;}
.in-flashbox .focusNew_out{width:460px;height:335px;position:relative;z-index:2}
.in-flashbox .focusNew_out .f_out_txt{height:50px;width:536px;display:block;position:absolute;bottom:0;left:0;background-color:#000000;opacity:0.8;color:#d6d6d6;font-size:20px;font-family:"微软雅黑";line-height:50px;padding:0 150px 0 20px;overflow:hidden}
.in-flashbox .focusNew_out .f_out_txt a{color:#d6d6d6;}
.in-flashbox .f_tabs{width:140px;height:35px;position:absolute;bottom:15px;right:0px;z-index:100;}
.in-flashbox .f_tabs span{width:23px;height:19px;background-color:#474747;float:left;margin-right:3px;text-align:center;color:#f0f0f0;margin-top:15px;cursor:pointer}
.in-flashbox .f_tabs span.hover{height:19px;background-color:#B51017;margin-top:0;padding-top:15px;cursor:pointer}
/* in-text */
.in-text{
width:360px;
height:335px;
float:left;
margin-right:30px;
}
.in-text h2{
display:block;
width:130px;
height:42px;
margin-bottom:10px;
background-image: url(img/lanmu-bj.png);
text-align:center;
font:16px/42px 'microsoft yahei';
color:#333;
font-weight: bold;
}
.in-text a{
display:block;
width:360px;
height:34px;
overflow:hidden;
border-bottom:1px dashed #CCC;
transition-duration:0.2s;
}
.in-text a:hover{
border-bottom:1px dashed #ce2f2b;
}
.in-text a span{
display:block;
width:300px;
height:34px;
float:left;
overflow:hidden;
font:15px/34px 'microsoft yahei';
color:#333;
transition-duration:0.2s;
}
.in-text a:hover span{
color:#ce2f2b;
}
.in-text a em{
display:block;
width:60px;
height:34px;
float:left;
font:14px/34px 'microsoft yahei';
color:#666;
text-align:right;
transition-duration:0.2s;
}
.in-text a:hover em{
font:18px/34px 'microsoft yahei';
}
/*index-show*/
.index-show{
width:100%;
height:795px;
overflow:hidden;
margin:20px auto 0 auto;
background:url(img/index-show-bj.jpg) no-repeat center top;
}
.index-show .main{
width:1240px;
height:795px;
margin:0 auto;
}
.index-show .main h2{
display:block;
width:130px;
height:42px;
margin-bottom:10px;
background-image: url(img/lanmu-bj.png);
text-align:center;
font:16px/42px 'microsoft yahei';
color:#333;
font-weight: bold;
}
.colee-item{
display:block;
width:260px;
height:240px;
overflow:hidden;
margin-right:10px;
}
.class-list{
width:1240px;
height:382px;
margin:60px auto 0 auto;
text-align:center;
}
.class-list .item{
display:inline-block;
vertical-align: middle;
width:280px;
height:372px;
margin:0 12px;
background: rgba(255,255,255, 0.8);
...
3.JS
代码如下(节选示例):
(function(a){a.fn.slide=function(b){return a.fn.slide.defaults={effect:"fade",autoPlay:!1,delayTime:500,interTime:4000,triggerTime:150,defaultIndex:0,titCell:".hd li",mainCell:".bd",targetCell:null,trigger:"mouseover",scroll:1,vis:1,titOnClassName:"on",autoPage:!1,prevCell:".prev",nextCell:".next",pageStateCell:".pageState",opp:!1,pnLoop:!0,easing:"linear",startFun:null,endFun:null,switchLoad:null},this.each(function(){var c=a.extend({},a.fn.slide.defaults,b),d=c.effect,e=a(c.prevCell,a(this)),f=a(c.nextCell,a(this)),g=a(c.pageStateCell,a(this)),h=a(c.titCell,a(this)),i=h.size(),j=a(c.mainCell,a(this)),k=j.children().size(),l=c.switchLoad;if(null!=c.targetCell)var m=a(c.targetCell,a(this));var n=parseInt(c.defaultIndex),o=parseInt(c.delayTime),p=parseInt(c.interTime);parseInt(c.triggerTime);var r=parseInt(c.scroll),s=parseInt(c.vis),t="false"==c.autoPlay||0==c.autoPlay?!1:!0,u="false"==c.opp||0==c.opp?!1:!0,v="false"==c.autoPage||0==c.autoPage?!1:!0,w="false"==c.pnLoop||0==c.pnLoop?!1:!0,x=0,y=0,z=0,A=0,B=c.easing,C=null,D=n;if(0==i&&(i=k),v){var E=k-s;i=1+parseInt(0!=E%r?E/r+1:E/r),0>=i&&(i=1),h.html("");for(var F=0;i>F;F++)h.append("<li>"+(F+1)+"</li>");var h=a("li",h)}if(j.children().each(function(){a(this).width()>z&&(z=a(this).width(),y=a(this).outerWidth(!0)),a(this).height()>A&&(A=a(this).height(),x=a(this).outerHeight(!0))}),k>=s)switch(d){case"fold":j.css({position:"relative",width:y,height:x}).children().css({position:"absolute",width:z,left:0,top:0,display:"none"});break;case"top":j.wrap('<div class="tempWrap" style="overflow:hidden; position:relative; height:'+s*x+'px"></div>').css({position:"relative",padding:"0",margin:"0"}).children().css({height:A});break;case"left":j.wrap('<div class="tempWrap" style="overflow:hidden; position:relative; width:'+s*y+'px"></div>').css({width:k*y,position:"relative",overflow:"hidden",padding:"0",margin:"0"}).children().css({"float":"left",width:z});break;case"leftLoop":case"leftMarquee":j.children().clone().appendTo(j).clone().prependTo(j),j.wrap('<div class="tempWrap" style="overflow:hidden; position:relative; width:'+s*y+'px"></div>').css({width:3*k*y,position:"relative",overflow:"hidden",padding:"0",margin:"0",left:-k*y}).children().css({"float":"left",width:z});break;case"topLoop":case"topMarquee":j.children().clone().appendTo(j).clone().prependTo(j),j.wrap('<div class="tempWrap" style="overflow:hidden; position:relative; height:'+s*x+'px"></div>').css({height:3*k*x,position:"relative",padding:"0",margin:"0",top:-k*x}).children().css({height:A})}var G=function(){a.isFunction(c.startFun)&&c.startFun(n,i)},H=function(){a.isFunction(c.endFun)&&c.endFun(n,i)},I=function(b){b.eq(n).find("img").each(function(){a(this).attr(l)!==void 0&&a(this).attr("src",a(this).attr(l)).removeAttr(l)})},J=function(a){if(D!=n||a||"leftMarquee"==d||"topMarquee"==d){switch(d){case"fade":case"fold":case"top":case"left":n>=i?n=0:0>n&&(n=i-1);break;case"leftMarquee":case"topMarquee":n>=1?n=1:0>=n&&(n=0);break;case"leftLoop":case"topLoop":var b=n-D;i>2&&b==-(i-1)&&(b=1),i>2&&b==i-1&&(b=-1);var p=Math.abs(b*r);n>=i?n=0:0>n&&(n=i-1)}if(G(),null!=l&&I(j.children()),m&&(null!=l&&I(m),m.hide().eq(n).animate({opacity:"show"},o,function(){j[0]||H()})),k>=s)switch(d){case"fade":j.children().stop(!0,!0).eq(n).animate({opacity:"show"},o,B,function(){H()}).siblings().hide();break;case"fold":j.children().stop(!0,!0).eq(n).animate({opacity:"show"},o,B,function(){H()}).siblings().animate({opacity:"hide"},o,B);break;case"top":j.stop(!0,!1).animate({top:-n*r*x},o,B,function(){H()});break;case"left":j.stop(!0,!1).animate({left:-n*r*y},o,B,function(){H()});break;case"leftLoop":0>b?j.stop(!0,!0).animate({left:-(k-p)*y},o,B,function(){for(var a=0;p>a;a++)j.children().last().prependTo(j);j.css("left",-k*y),H()}):j.stop(!0,!0).animate({left:-(k+p)*y},o,B,function(){for(var a=0;p>a;a++)j.children().first().appendTo(j);j.css("left",-k*y),H()});break;case"topLoop":0>b?j.stop(!0,!0).animate({top:-(k-p)*x},o,B,function(){for(var a=0;p>a;a++)j.children().last().prependTo(j);j.css("top",-k*x),H()}):j.stop(!0,!0).animate({top:-(k+p)*x},o,B,function(){for(var a=0;p>a;a++)j.children().first().appendTo(j);j.css("top",-k*x),H()});break;case"leftMarquee":var q=j.css("left").replace("px","");0==n?j.animate({left:++q},0,function(){if(j.css("left").replace("px","")>=0){for(var a=0;k>a;a++)j.children().last().prependTo(j);j.css("left",-k*y)}}):j.animate({left:--q},0,function(){if(2*-k*y>=j.css("left").replace("px","")){for(var a=0;k>a;a++)j.children().first().appendTo(j);j.css("left",-k*y)}});break;case"topMarquee":var t=j.css("top").replace("px","");0==n?j.animate({top:++t},0,function(){if(j.css("top").replace("px","")>=0){for(var a=0;k>a;a++)j.children().last().prependTo(j);j.css("top",-k*x)}}):j.animate({top:--t},0,function(){if(2*-k*x>=j.css("top").replace("px","")){for(var a=0;k>a;a++)j.children().first().appendTo(j);j.css("top",-k*x)}})}h.removeClass(c.titOnClassName).eq(n).addClass(c.titOnClassName),D=n,0==w&&(f.removeClass("nextStop"),e.removeClass("prevStop"),0==n?e.addClass("prevStop"):n==i-1&&f.addClass("nextStop")),g.html("<span>"+(n+1)+"</span>/"+i)}};J(!0),t&&("leftMarquee"==d||"topMarquee"==d?(u?n--:n++,C=setInterval(J,p),j.hover(function(){t&&clearInterval(C)},function(){t&&(clearInterval(C),C=setInterval(J,p))})):(C=setInterval(function(){u?n--:n++,J()},p),a(this).hover(function(){t&&clearInterval(C)},function()
...
五、总结
设计一个样式美观又人性化的网页,除了具备扎实的专业知识,还需具备美学和人机工程学等相关知识,优秀的网页应具备以下几个特点:
1.简洁实用
尽量以最高效率的方式将用户所要想得到的信息传送给他就是最好的,要去掉所有的冗余的东西;
2.使用方便
要满足使用者的要求,网页适合使用,显示出其功能美;
3.整体性好
围绕一个统一的目标设计,强调整体的功能性;
4.形象突出
尽量符合网页美的标准,能够使网站的形象得到最大限度的提升,追求雅俗共赏。页面用色协调,布局符合形式美的要求:布局有条理,充分利用美的形式,使网页富有可欣赏性,提高档次。
5.交互式强
发挥网络的优势,想方设法使每个使用者都参与到其中来。
更多优质博客文章、完整代码案例模板,点击以下链接查阅:
Web前端网页制作、大学生期末大作业、课程设计、毕业设计、完整代码案例模板、Web前端网页定制、教学课程、学习资料等,有需要的添加以下微信交流👇🏻👇🏻👇🏻