495. 响应式潮流小游戏网页 大学生期末大作业 Web前端网页制作 html+css+js
目录
欢迎光临仙女的网页世界!这里有各行各业的Web前端网页制作的案例,样式齐全新颖,并持续更新!感谢CSDN,提供了这么好的知识学习、技术交流的平台,让我们在这里相遇,小伙伴们,来吧,让我们一起开启Web前端网页制作的奇妙之旅!
说起Web前端,大学开启这扇技术之门以来,一切起始于兴趣爱好和专业钻研。自16年中大研究生毕业步入社会工作以来,才真正开启了这段奇妙的旅行!在一次次需求分析、成品交付和客户服务的过程中,进行了一次又一次的知识应用的实践和验证。学以致用,实践出真知!从最初的Web前端的迷途小书童到如今的技术专家,多年的服务客户和服务大学生的实践经验,早就驾轻就熟!
奇妙之处在于:当你得到客户的认可、公司的赞赏和同事的敬仰,尤其是业余时间为广大的大学生提供各种各样的帮助和指引,学弟学妹们一致好评,认为学姐是他们的榜样的时候,你会发现,知识的应用除了体现自身价值,还能实现自我满足!这种感觉是相当奇妙的!
我在CSDN的奇妙旅行,除了学习其他知识和持续发布优质的网页实例之外,后续时间允许的情况下,我会发布前端相关知识的学习和应用的教程。目前提供的服务类型包括:Web前端网页制作的专题研究辅导、网页定制、大学生课程作业辅导、毕设辅导、网页模板源码、教程资料、技术咨询,以及其他有偿或无偿的服务。如有需要,欢迎随时咨询!能满足你们所需,是我的荣幸!
非常感谢大家的关注和点赞,你们的关注和点赞是我持续创作的动力,谢谢!
一、网页概述
本实例应用html+css+js: 导航菜单、图片轮翻、鼠标滑动特效等。适用于大学生网页课程作业设计、公司网页制作等。响应式布局可以根据不同的设备屏幕大小自动调整页面布局,提高用户体验;本网页支持如Dreamweaver、HBuilder、Text 、Vscode 等任意html编辑软件进行编辑修改;支持包括IE、Firefox、Chrome、Safari主流浏览器浏览。
二、网页文件
本网页实例共包含6个页面:
三、网页效果
以下是本篇文章正文内容,下面案例仅供参考(节选示例):
四、代码展示
1.html
<!DOCTYPE html>
<html lang="en">
<head>
<title>Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Kids Video Game Responsive web template, Bootstrap Web Templates, Flat Web Templates, Android Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- css -->
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
<link rel="stylesheet" href="css/flexslider.css" type="text/css" media="screen" property="" />
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<!--// css -->
<!-- font -->
<link href='http://fonts.googleapis.com/css?family=Josefin+Sans:400,100,100italic,300,300italic,400italic,600,600italic,700,700italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic' rel='stylesheet' type='text/css'>
<!-- //font -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.js"></script>
</head>
<body>
<!-- Header -->
<div class="header">
<!-- Navbar -->
<nav class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">切换导航<</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li class="hover-effect"><a href="index.html">首页</a></li>
<li class="hover-effect"><a href="about.html">关于</a></li>
<li class="hover-effect"><a href="games.html">游戏</a></li>
<li class="hover-effect"><a href="news.html">新闻</a></li>
<li class="hover-effect"><a href="contact.html">接触</a></li>
</ul>
</div>
</div>
</nav>
<!-- //Navbar -->
<!-- Slider -->
<div class="slider">
<ul class="rslides" id="slider">
<li>
<img src="images/banner1.jpg">
</li>
<li> </li>
<li>
<img src="images/banner3.jpg" alt="" />
</li>
</ul>
</div>
<!-- //Slider -->
</div>
<!-- Banner-Slider-JavaScript -->
<script src="js/responsiveslides.min.js"></script>
<script>
$(function () {
$("#slider").responsiveSlides({
auto: true,
nav: true,
speed: 800,
namespace: "callbacks",
pager: true,
});
});
</script>
<!-- //Banner-Slider-JavaScript -->
<!-- //Header -->
<!-- trend -->
<div class="trend-w3layouts">
<div class="container">
<h2>潮流小游戏</h2>
<ul id="flexiselDemo1">
<li>
<div class="trend-grid">
<h4>赛车游戏</h4>
<img src="images/tg1.jpg" alt=" " class="img-responsive" />
</div>
</li>
<li>
<div class="trend-grid">
<h4>3D游戏</h4>
<img src="images/tg2.jpg" alt=" " class="img-responsive" />
</div>
</li>
<li>
<div class="trend-grid">
<h4>动作游戏</h4>
<img src="images/tg3.jpg" alt=" " class="img-responsive" />
</div>
</li>
<li>
<div class="trend-grid">
<h4>玩具小游戏</h4>
<img src="images/tg4.jpg" alt=" " class="img-responsive" />
</div>
</li>
</ul>
<script type="text/javascript">
$(window).load(function() {
$("#flexiselDemo1").flexisel({
visibleItems: 4,
animationSpeed: 1000,
autoPlay: true,
autoPlaySpeed: 3000,
pauseOnHover: true,
enableResponsiveBreakpoints: true,
responsiveBreakpoints: {
portrait: {
changePoint:480,
visibleItems: 2
},
landscape: {
changePoint:640,
visibleItems:3
},
tablet: {
changePoint:768,
visibleItems: 4
}
}
});
});
</script>
<script type="text/javascript" src="js/jquery.flexisel.js"></script>
</div>
</div>
<!-- //trend -->
<!-- services-->
<div class="services-agileits-w3layouts">
<div class="container">
<h3>服务</h3>
<div class="col-md-3 service-grid-agileits service-grid-agileits-top">
<span class="glyphicon glyphicon-sort-by-attributes" aria-hidden="true"></span>
<h4>下载</h4>
<p>游戏下载</p>
<a href="single.html">更多</a>
</div>
<div class="col-md-3 service-grid-agileits">
<span class="glyphicon glyphicon-random" aria-hidden="true"></span>
<h4>分享</h4>
<p>游戏分享</p>
<a href="single.html">更多</a>
</div>
<div class="col-md-3 service-grid-agileits service-grid-agileits-bottom">
<span class="glyphicon glyphicon-yen" aria-hidden="true"></span>
<h4>交易</h4>
<p>游戏充值</p>
<a href="single.html">更多</a>
</div>
<div class="col-md-3 service-grid-agileits service-grid-agileits-bottom">
<span class="glyphicon glyphicon-object-align-right" aria-hidden="true"></span>
<h4>个人中心</h4>
<p>个人中心</p>
<a href="single.html">更多</a>
</div>
<div class="clearfix"></div>
</div>
</div>
<!-- //services-->
...
2.CSS
代码如下(节选示例):
/*-- Reset Code --*/
body {
padding: 0;
margin: 0;
background: #FFF;
font-family: 'open Sans', sans-serif;
}
body a {
transition: 0.5s all;
-webkit-transition: 0.5s all;
-moz-transition: 0.5s all;
-o-transition: 0.5s all;
-ms-transition: 0.5s all;
text-decoration: none;
}
body a:hover {
text-decoration: none;
}
body a:focus, a:hover {
text-decoration: none;
}
input[type="button"], input[type="submit"] {
transition: 0.5s all;
-webkit-transition: 0.5s all;
-moz-transition: 0.5s all;
-o-transition: 0.5s all;
-ms-transition: 0.5s all;
}
h1, h2, h3, h4, h5, h6 {
margin: 0;
padding: 0;
text-align: center;
font-family: 'Josefin Sans', sans-serif;
letter-spacing:1px;
}
p {
margin:0;
}
ul {
margin:0;
padding:0;
}
label {
margin:0;
}
a:focus, a:hover {
text-decoration: none;
outline: none
}
img {
width: 100%;
}
/*-- //Reset Code --*/
/*-- Banner --*/
/*-- Navbar --*/
.navbar {
margin-bottom: 0;
position: absolute;
z-index: 99999;
background:transparent;
border: none;
border-radius: 0;
width: 100%;
padding: 10px 0;
}
.navbar-header h1{
color:#fff;
font-size:40px;
}
.navbar-header img{
width:20%;
}
.navbar-nav>li {
padding: 5px 15px;
}
.navbar-default .navbar-nav>li>a {
color: #fff;
}
.navbar-default .navbar-nav>li>a:hover, .navbar-default .navbar-nav>li>a:focus {
color: #FFF;
}
.navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus {
color: #E91E63;
background-color: transparent;
}
/*-- Link-Hover-Effect --*/
.hover-effect a {
padding: 10px;
color: #237546;
font-weight: 700;
text-shadow: none;
-webkit-transition: color 0.3s;
-moz-transition: color 0.3s;
transition: color 0.3s;
font-family: 'Raleway', sans-serif;
}
.hover-effect a::before, .hover-effect a::after {
position: absolute;
left: 0;
width: 100%;
height: 2px;
background: #fff;
content: '';
opacity: 0;
-webkit-transition: opacity 0.3s, -webkit-transform 0.3s;
-moz-transition: opacity 0.3s, -moz-transform 0.3s;
transition: opacity 0.3s, transform 0.3s;
-webkit-transform: translateY(-10px);
-moz-transform: translateY(-10px);
transform: translateY(-10px);
}
.hover-effect a::before {
top: 0;
-webkit-transform: translateY(-10px);
-moz-transform: translateY(-10px);
transform: translateY(-10px);
}
...
3.JS
代码如下(节选示例):
/*
* File: jquery.flexisel.js
* Version: 1.0.0
* Description: Responsive carousel jQuery plugin
* Author: 9bit Studios
* Copyright 2012, 9bit Studios
* http://www.9bitstudios.com
* Free to use and abuse under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function ($) {
$.fn.flexisel = function (options) {
var defaults = $.extend({
visibleItems: 4,
animationSpeed: 200,
autoPlay: false,
autoPlaySpeed: 3000,
pauseOnHover: true,
setMaxWidthAndHeight: false,
enableResponsiveBreakpoints: false,
responsiveBreakpoints: {
portrait: {
changePoint:480,
visibleItems: 1
},
landscape: {
changePoint:640,
visibleItems: 2
},
tablet: {
changePoint:768,
visibleItems: 3
}
}
}, options);
/******************************
Private Variables
*******************************/
var object = $(this);
var settings = $.extend(defaults, options);
var itemsWidth; // Declare the global width of each item in carousel
var canNavigate = true;
var itemsVisible = settings.visibleItems;
/******************************
Public Methods
*******************************/
var methods = {
init: function() {
return this.each(function () {
methods.appendHTML();
methods.setEventHandlers();
methods.initializeItems();
});
},
/******************************
Initialize Items
*******************************/
initializeItems: function() {
var listParent = object.parent();
var innerHeight = listParent.height();
var childSet = object.children();
var innerWidth = listParent.width(); // Set widths
itemsWidth = (innerWidth)/itemsVisible;
childSet.width(itemsWidth);
childSet.last().insertBefore(childSet.first());
childSet.last().insertBefore(childSet.first());
object.css({'left' : -itemsWidth});
object.fadeIn();
$(window).trigger("resize"); // needed to position arrows correctly
},
/******************************
Append HTML
*******************************/
appendHTML: function() {
object.addClass("nbs-flexisel-ul");
object.wrap("<div class='nbs-flexisel-container'><div class='nbs-flexisel-inner'></div></div>");
object.find("li").addClass("nbs-flexisel-item");
if(settings.setMaxWidthAndHeight) {
var baseWidth = $(".nbs-flexisel-item > img").width();
var baseHeight = $(".nbs-flexisel-item > img").height();
$(".nbs-flexisel-item > img").css("max-width", baseWidth);
$(".nbs-flexisel-item > img").css("max-height", baseHeight);
}
$("<div class='nbs-flexisel-nav-left'></div><div class='nbs-flexisel-nav-right'></div>").insertAfter(object);
var cloneContent = object.children().clone();
object.append(cloneContent);
},
/******************************
Set Event Handlers
*******************************/
setEventHandlers: function() {
var listParent = object.parent();
var childSet = object.children();
var leftArrow = listParent.find($(".nbs-flexisel-nav-left"));
var rightArrow = listParent.find($(".nbs-flexisel-nav-right"));
$(window).on("resize", function(event){
methods.setResponsiveEvents();
var innerWidth = $(listParent).width();
var innerHeight = $(listParent).height();
itemsWidth = (innerWidth)/itemsVisible;
childSet.width(itemsWidth);
object.css({'left' : -itemsWidth});
var halfArrowHeight = (leftArrow.height())/2;
var arrowMargin = (innerHeight/2) - halfArrowHeight;
leftArrow.css("top", arrowMargin + "px");
rightArrow.css("top", arrowMargin + "px");
});
$(leftArrow).on("click", function (event) {
methods.scrollLeft();
});
$(rightArrow).on("click", function (event) {
methods.scrollRight();
});
if(settings.pauseOnHover == true) {
$(".nbs-flexisel-item").on({
mouseenter: function () {
canNavigate = false;
},
mouseleave: function () {
canNavigate = true;
}
});
}
if(settings.autoPlay == true) {
setInterval(function () {
if(canNavigate == true)
methods.scrollRight();
}, settings.autoPlaySpeed);
}
},
...
五、总结
设计一个样式美观又人性化的网页,除了具备扎实的专业知识,还需具备美学和人机工程学等相关知识,优秀的网页应具备以下几个特点:
1.简洁实用
尽量以最高效率的方式将用户所要想得到的信息传送给他就是最好的,要去掉所有的冗余的东西;
2.使用方便
要满足使用者的要求,网页适合使用,显示出其功能美;
3.整体性好
围绕一个统一的目标设计,强调整体的功能性;
4.形象突出
尽量符合网页美的标准,能够使网站的形象得到最大限度的提升,追求雅俗共赏。页面用色协调,布局符合形式美的要求:布局有条理,充分利用美的形式,使网页富有可欣赏性,提高档次。
5.交互式强
发挥网络的优势,想方设法使每个使用者都参与到其中来。
六、更多推荐
【关注作者|获取更多源码|优质文章】;Web前端网页制作、大学生毕业设计辅导、期末大作业辅导、模板源码、技术咨询等,有兴趣的联系我!
您的支持是我创作的动力!看到这里就【点赞收藏博文】,Thanks!
更多优质博客文章、网页模板点击以下链接查阅:仙女网页设计-CSDN博客。