各位大佬们,本人大二课程设计。
想让背景从单一的图片变成轮播图,并且在移动端上面也不会出现问题。
请求大神指教!!!!!!!!!!!<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>tejia</title>
<style type="text/css">
.zhengti{
position:relative;
top:0;
left:0;
height:100%;
width:100%;
float: left;
background-image: url("images/3.webp");
background-repeat: no-repeat;
background-size:cover;
background-attachment: fixed;
background-position: center 0;
}
.header{
width: auto;
height: 200px;
background-color:#000000;
}
/*--serach----*/
.search {
float: right;
position:relative;
margin-top: 150px;
}
.search input[type="text"] {
border: 1px solid #BABDB9;
font-size: 13px;
width: 240px;
height: 32px;
outline: none;
border: 1px solid #D9D9D9;
border-bottom: 1px solid #D9D9D9;
background: #FFF;
-webkit-box-shadow: inset 1px 4px 4px rgba(227, 227, 227, 0.5);
box-shadow: inset 1px 4px 4px rgba(227, 227, 227, 0.5);
-webkit-border-radius: 2px;
border-radius: 2px;
}
.gray-button {
padding: 2px 10px 2px;
height:35px;
color:#000000;
font-size: 12px;
cursor: pointer;
border: 1px solid #D9D9D9;
border-bottom: 1px solid #D9D9D9;
background: #FFF;
-webkit-box-shadow: inset 1px 4px 4px rgba(227, 227, 227, 0.5);
box-shadow: inset 1px 4px 4px rgba(227, 227, 227, 0.5);
-webkit-border-radius: 2px;
border-radius: 2px;
}
.gray-button:hover {
color:#F80004;
}
/*--menu--*/
.menu{
width: auto;
position: absolute;
list-style-type: none;
text-align: center;
padding-left: 10px;
padding-right: 10px;
margin:0 auto;
background:#000000;;
}
.top-nav{
margin: 0 20px 0 20px;
}
.top-nav li {
list-style-type: none;
color: #FBFAFA;
border: none;
float: left;
border-right: 2px ridge #FFFFFF;
}
.top-nav li.active a, .top-nav li a:hover {
background: #f0f0f0;
color:#222;
}
.top-nav li a {
text-decoration: none;
display: block;
color:#fff;
padding:20px 0 16px;
min-height: 23px;
height: auto !important;
width:217px;
text-align: center;
font-size: 18px;
font-weight: bold;
}
.top-nav li:first-child{
border-left: 2px ridge #FAFAFA;
}
.clear{clear:both;}
.price {
padding: 5% 0;
font-size: 15px;
}
p.title {
font-size: 13px;
color:#D54F30;
line-height: 1.6em;
margin-top: 9%;
}
p.title1 {
font-size: 13px;
color:#333;
line-height: 1.8em;
}
.price {
padding: 5% 0;
font-size: 15px;
}
span.reducedfrom {
margin-right: 8%;
color:#FFFFFF;
font-size: 1.2em;
font-weight: bold;
}
span.actual {
text-decoration: line-through;
margin-right: 8%;
color: #F90004;
font-size: 1.2em;
}
.grid_1{
border: 1px solid #D9D9D9;
}
.grid_1 img{
display:block;
}
.grid_desc{
padding: 1% 7% 7% 7%;
border-top: 1px solid #D9D9D9;
}
.cart{
float:left;
}
.cart a img:hover{
background: #C74426;
}
.cart img{
background: #D54F30;
}
.button{
border: 1px solid #D9D9D9;
border-bottom: 1px solid #B9B9B9;
-webkit-border-radius: 5px;
border-radius: 5px;
background: #F5F5F5;
float:right;
padding: 7px 20px;
color:#D54F30;
font-size: 1em;
font-weight: bold;
cursor:pointer;
}
.button:hover{
background: #D54F30;
color:#fff;
}
.grid_1_of_3{
display: block;
float:left;
margin: 1% 0 1% 1.6%;
}
.grid_1_of_3:first-child {
margin-left: 0;
}
.images_1_of_3 {
width: 32.2%;
}
.images_1_of_3 img {
max-width:100%;
display:block;
}
.images_1_of_3 h3{
color:#C94848;
margin-top:0.4em;
margin-bottom:0.2em;
font-size:1.2em;
font-weight : normal;
letter-spacing: -1px;
}
.box_wrapper {
padding:10px 17px 10px 15px;
text-transform: uppercase;
font-size: 14px;
font-weight: bold;
line-height: 21px;
color:#FFFFFF;
border-bottom: 1px solid #D0D0D0;
/*background: #F5F5F5;*/
-webkit-border-radius: 3px;
border-radius: 3px;
margin-top: 10px;
}
.text{
margin-top:7px;
/* background-color: #FFFFFF;*/
}
.paging {
margin: 3% 0 12%;
}
.about_wrapper{color: #FFFFFF;}
.paging li{
list-style-type: none;
}
.paging li a {
float: left;
display: block;
color: #555;
text-decoration: none;
margin-right: 10px;
padding: 0px 10px;
background:#f0f0f0;
border: 1px solid #CED3C9;
font-size: 16px;
}
.paging li a:hover {
background:#E9E7E7;
color: #333;
}
.div_2{
float:left;
margin: 10px;
}
.div_2 a{
color:#FFEFEF;
text-decoration: none;
font-size:1.8em;
}
.div_2 a:hover{
color:#D54F30;
}
.div_img{
float:right;
margin-right: 10px;
}
.box {
border-radius: 3px;
border-bottom: 1px solid #929292;
margin-bottom: 4%;
}
.box-content{
padding: 5% 6%;
color: #FFF;
}
.box-heading h1{
padding:1% 1% 0% 2%;
}
.box-heading h1 a{
color:#fff;
font-size:1.3em;
text-decoration: none;
}
.box-content{
padding-left: 2%;
padding-top: 0%;
}
.box-content strong {
font-weight: normal;
text-decoration: underline;
}
@media (max-width:1366px){
.wrap{
width:95%;
}
}
@media (max-width:1280px){
.wrap{
width:95%;
}
.top-nav li a {
width:203px;
}
}
@media (max-width:1024px){
.wrap{
width:95%;
}
.top-nav li a {
width:160px;
min-height:0px;
}
.button {
font-size: 13px;
}
.div_2 a {
font-size: 1.5em;
}
.box-content {
font-size: 13px;
}
.team h2 {
font-size: 1.5em;
}
.contact-form input[type="text"], .contact-form textarea{
width: 97%;
}
}
@media (max-width:800px){
.wrap{
width:95%;
}
.top-nav li a {
width:121px;
min-height:0px;
}
#slideshow .arrow{
top: 40%;
}
#slideshow {
height:263px;
}
.button {
font-size: 13px;
padding: 5px 10px;
}
.div_2 a {
font-size:1.2em;
}
.box-content {
font-size: 13px;
}
.team h2 {
font-size: 1.5em;
}
.contact-form input[type="text"], .contact-form textarea{
width: 96%;
}
.follow_icon {
float:none;
}
.user_menu li {
float:none;
}
.user_menu{
margin-bottom:20px;
}
.header-bot {
padding: 8% 2% 2% 2%;
}
span.actual {
margin-right:0px;
color: #555;
font-size: 1em;
}
span.reducedfrom {
font-size: 1em;
}
}
@media (max-width:640px){
.wrap{
width:95%;
}
.top-nav li a {
width:96px;
min-height: 0px;
font-size: 13px;
}
#slideshow .arrow{
top: 40%;
}
#slideshow {
height:290px;
}
.button {
font-size: 13px;
padding: 3px 7px;
}
.div_2 a {
font-size:1.2em;
}
.box-content {
font-size: 13px;
}
.team h2 {
font-size: 1.5em;
padding-bottom:0px;
}
.contact-form input[type="text"], .contact-form textarea{
width: 97%;
}
.follow_icon {
float:none;
}
.user_menu li {
float:none;
}
.user_menu{
margin-bottom:20px;
}
.header-bot {
padding: 8% 2% 2% 2%;
}
span.actual {
margin-right:0px;
color: #555;
font-size: 1em;
}
span.reducedfrom {
font-size:13px;
}
.user_menu li {
padding: 0px 5px 0px 5px;
}
.logo {
width: 30%;
}
.search input[type="text"] {
width:200px;
}
.header_bottom_right_images {
float:none;
width:100%;
margin-right:0px;
}
.header-para {
float:none;
width:100%;
}
.span_1_of_2 img{
width: 24%;
}
.leave-comment, .leave-reply {
margin: 1% 0 -6%;
}
.paging {
margin: 1% 0 12%;
}
.box-content {
padding: 3% 5%;
}
.box-heading h1 {
padding: 3% 5% 0% 5%;
}
.span_2_of_c h3 {
font-size: 1.5em;
}
}
@media (max-width:480px){
.wrap{
width:95%;
}
.top-nav li a {
width:68px;
min-height: 0px;
font-size: 13px;
}
#slideshow .arrow{
top: 40%;
}
#slideshow {
height:210px;
}
.button {
font-size: 13px;
padding: 3px 7px;
}
.div_2 a {
font-size:1.2em;
}
.box-content {
font-size: 13px;
}
.team h2 {
font-size: 1.5em;
padding-bottom:0px;
}
.contact-form input[type="text"], .contact-form textarea{
width: 97%;
}
.follow_icon {
float:none;
}
.user_menu li {
float:none;
}
.user_menu{
margin-bottom:20px;
}
.header-bot {
padding:12% 2% 2% 2%;
}
span.actual {
margin-right:0px;
color: #555;
font-size: 1em;
}
span.reducedfrom {
font-size:13px;
}
.user_menu li {
padding: 0px 5px 0px 5px;
font-size: 12px;
}
.logo {
width: 30%;
}
.search input[type="text"] {
width: 160px;
}
.header_bottom_right_images {
float:none;
width:100%;
margin-right:0px;
}
.header-para {
float:none;
width:100%;
}
.span_1_of_2 img{
width: 24%;
}
.leave-comment, .leave-reply {
margin: 1% 0 -10%;
}
.paging {
margin: 1% 0 12%;
}
.box-content {
padding: 3% 5%;
}
.box-heading h1 {
padding: 3% 5% 0% 5%;
}
.span_2_of_c h3 {
font-size: 1.5em;
}
.search input[type="text"] {
height: 25px;
}
.gray-button {
height: 28px;
}
.grid_desc {
padding: 0% 6% 6% 6%;
}
.btn {
padding: 5px 10px;
}
.images_1_of_3 {
width: 100%;
}
}
@media (max-width:320px){
.wrap{
width:95%;
}
.top-nav li a {
width:100%;
min-height: 0px;
font-size: 13px;
}
.button {
font-size: 13px;
padding: 3px 7px;
}
.div_2 a {
font-size:1.2em;
}
.box-content {
font-size: 13px;
}
.team h2 {
font-size: 1.5em;
padding-bottom:0px;
}
.contact-form input[type="text"], .contact-form textarea{
width: 91%;
}
.header-bot {
padding:15% 2% 2% 2%;
}
span.actual {
margin-right:0px;
color: #555;
font-size: 1em;
}
span.reducedfrom {
font-size:13px;
}
.user_menu li {
padding: 0px 5px 0px 5px;
font-size: 12px;
}
.logo {
width:70%;
}
.search input[type="text"] {
width: 160px;
}
.header_bottom_right_images {
float:none;
width:100%;
margin-right:0px;
}
.header-para {
float:none;
width:100%;
}
.span_1_of_2 img{
width:23%;
}
.leave-comment, .leave-reply {
margin: 1% 0 -15%;
}
.paging {
margin:5% 0 32%;
}
.box-content {
padding: 3% 5%;
}
.box-heading h1 {
padding: 3% 5% 0% 5%;
}
.span_2_of_c h3 {
font-size: 1.5em;
}
.search input[type="text"] {
height: 25px;
}
.gray-button {
height: 28px;
}
.grid_desc {
padding: 0% 6% 6% 6%;
}
.btn {
padding: 5px 10px;
}
.top-nav li {
float:none;
border-right:0px;
}
.top-nav li:first-child {
border-left:0px;
}
.top-nav li a {
padding: 10px 0 10px;
}
.span_2_of_a h4 {
font-size: 1.5em;
}
}
</style>
</head>
<body>
<div class="zhengti">
<div class="header">
<img src="images/logo.webp" width="300px" height="110px">
<div class="search">
<input type="text" class="textbox" value="" onFocus="this.value = '';" onBlur="if (this.value == '') {this.value = '';}">
<button class="gray-button"><span>搜索</span></button>
</div>
<div class="menu">
<div class="top-nav">
<ul>
<li><a href="index.html">主页</a></li>
<li class="active"><a href="specials.html">特价</a></li>
<li><a href="new.html">新品</a></li>
<li><a href="contact.html">关于我们</a></li>
</ul>
<div class="clear"></div>
</div>
</div>
</div>
<!--购物表单-->
<div class="content-wrapper">
<div class="content-top">
<div class="about_wrapper"><h1>特价</h1>
</div>
<div class="text">
<div class="grid_1_of_3 images_1_of_3">
<div class="grid_1">
<a href="single.html"><img src="images/1.webp" title="continue reading" alt=""></a>
<div class="grid_desc">
<p class="title">Lorem ipsum dolor sitconsectetuer adipiscing elit</p>
<div class="price" style="height: 19px;">
<span class="reducedfrom">$66.00</span>
<span class="actual">$122.00</span>
</div>
<div class="cart-button">
<div class="cart">
<button class="button"><span>详情</span></button>
</div>
<button class="button"><span>加购</span></button>
<div class="clear"></div>
</div>
</div>
</div><div class="clear"></div>
</div>
<div class="grid_1_of_3 images_1_of_3">
<div class="grid_1">
<a href="single.html"><img src="images/2.webp" title="continue reading" alt=""></a>
<div class="grid_desc">
<p class="title">Lorem ipsum dolor sitconsectetuer adipiscing elit</p>
<div class="price" style="height: 19px;">
<span class="reducedfrom">$66.00</span>
<span class="actual">$133.00</span>
</div>
<div class="cart-button">
<div class="cart">
<button class="button"><span>详情</span></button>
</div>
<button class="button"><span>加购</span></button>
<div class="clear"></div>
</div>
</div>
</div><div class="clear"></div>
</div>
<div class="grid_1_of_3 images_1_of_3">
<div class="grid_1">
<a href="single.html"><img src="images/3.webp" title="continue reading" alt=""></a>
<div class="grid_desc">
<p class="title">Lorem ipsum dolor sitconsectetuer adipiscing elit</p>
<div class="price" style="height: 19px;">
<span class="reducedfrom">$66.00</span>
<span class="actual">$132.00</span>
</div>
<div class="cart-button">
<div class="cart">
<button class="button"><span>详情</span></button>
</div>
<button class="button"><span>加购</span></button>
<div class="clear"></div>
</div>
</div>
</div><div class="clear"></div>
</div><div class="clear"></div>
</div>
</div>
<div class="content-top">
<div class="box_wrapper"><h1>限时特价</h1>
</div>
<div class="text">
<div class="grid_1_of_3 images_1_of_3">
<div class="grid_1">
<a href="single.html"><img src="images/6.webp" title="continue reading" alt=""></a>
<div class="grid_desc">
<p class="title">Lorem ipsum dolor sitconsectetuer adipiscing elit</p>
<div class="price" style="height: 19px;">
<span class="reducedfrom">$66.00</span>
<span class="actual">$122.00</span>
</div>
<div class="cart-button">
<div class="cart">
<button class="button"><span>详情</span></button>
</div>
<button class="button"><span>加购</span></button>
<div class="clear"></div>
</div>
</div>
</div><div class="clear"></div>
</div>
<div class="grid_1_of_3 images_1_of_3">
<div class="grid_1">
<a href="single.html"><img src="images/13.webp" title="continue reading" alt=""></a>
<div class="grid_desc">
<p class="title">Lorem ipsum dolor sitconsectetuer adipiscing elit</p>
<div class="price" style="height: 19px;">
<span class="reducedfrom">$66.00</span>
<span class="actual">$124.00</span>
</div>
<div class="cart-button">
<div class="cart">
<button class="button"><span>详情</span></button>
</div>
<button class="button"><span>加购</span></button>
<div class="clear"></div>
</div>
</div>
</div><div class="clear"></div>
</div>
<div class="grid_1_of_3 images_1_of_3">
<div class="grid_1">
<a href="single.html"><img src="images/14.webp" title="continue reading" alt=""></a>
<div class="grid_desc">
<p class="title">Lorem ipsum dolor sitconsectetuer adipiscing elit</p>
<div class="price" style="height: 19px;">
<span class="reducedfrom">$66.00</span>
<span class="actual">$124.00</span>
</div>
<div class="cart-button">
<div class="cart">
<button class="button"><span>详情</span></button>
</div>
<button class="button"><span>加购</span></button>
<div class="clear"></div>
</div>
</div>
</div><div class="clear"></div>
</div><div class="clear"></div>
</div>
</div>
</div>
<div class="paging">
<ul>
<li><a href="#" target="_parent">Previous</a></li>
<li><a href="#" target="_parent">1</a></li>
<li><a href="#" target="_parent">2</a></li>
<li><a href="#" target="_parent">3</a></li>
<li><a href="#" target="_parent">4</a></li>
<li><a href="#" target="_parent">5</a></li>
<li><a href="#" target="_parent">6</a></li>
<li><a href="#" target="_parent">Next</a></li>
</ul>
</div>
<div class="list-categories">
<div class="first-list">
<div class="div_2"><a href="">汽车业务</a></div>
<div class="div_img">
<img src="images/8.webp" alt="Cars" title="Cars" width="60" height="39">
</div><div class="clear"></div>
</div>
<div class="first-list">
<div class="div_2"><a href="">租赁业务</a></div>
<div class="div_img">
<img src="images/16.webp" alt="Cars" title="Cars" width="60" height="39">
</div><div class="clear"></div>
</div>
<div class="first-list">
<div class="div_2"><a href="">资金业务</a></div>
<div class="div_img">
<img src="images/14.webp" alt="Cars" title="Cars" width="60" height="39">
</div><div class="clear"></div>
</div>
<div class="first-list">
<div class="div_2"><a href="">卡车业务</a></div>
<div class="div_img">
<img src="images/11.webp" alt="Cars" title="Cars" width="60" height="39">
</div><div class="clear"></div>
</div>
</div>
<div class="box">
<div class="box-heading"><h1><a href="#">购物车: </a></h1></div>
<div class="box-content">
现在你的购物车中有 <strong> 0 件商品</strong>
</div>
</div>
<audio autoplay="autoplay" loop="loop" controls="controls">
<source src="beijingyinyue.mp3"
type="audio/mpeg">
</audio>
</div>
</body>
</html>
|