movie.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>正在热映--猫眼电影</title>
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/movie.css">
<link rel="stylesheet" href="css/common.css">
</head>
<body>
<div class="main">
<!-- 菜单 -->
<nav class="nav">
<a href="" class="select">正在热映</a>
<a href="">即将上映</a>
<a href="">经典影片</a>
</nav>
<div class="container">
<div class="choose-area">
<div class="choose-item clearfix">
<div class="left">类型:</div>
<div class="right">
<ul class="clearfix">
<li class="select"><a href="">全部</a></li>
<li><a href="">Consequuntur.</a></li>
<li><a href="">Aperiam!</a></li>
<li><a href="">Non?</a></li>
<li><a href="">Officia.</a></li>
<li><a href="">Ut.</a></li>
<li><a href="">Reiciendis?</a></li>
<li><a href="">Velit?</a></li>
<li><a href="">Asperiores.</a></li>
<li><a href="">Velit?</a></li>
<li><a href="">Laudantium.</a></li>
<li><a href="">Incidunt!</a></li>
<li><a href="">Impedit?</a></li>
<li><a href="">Ipsam?</a></li>
<li><a href="">Suscipit!</a></li>
<li><a href="">Perspiciatis!</a></li>
<li><a href="">Doloribus.</a></li>
<li><a href="">Molestiae!</a></li>
<li><a href="">Eos.</a></li>
<li><a href="">Perferendis?</a></li>
</ul>
</div>
</div>
<div class="choose-item clearfix">
<div class="left">区域:</div>
<div class="right">
<ul class="clearfix">
<li><a href="">全部</a></li>
<li><a href="">Consequuntur.</a></li>
<li><a href="">Aperiam!</a></li>
<li><a href="">Non?</a></li>
<li><a href="">Officia.</a></li>
<li><a href="">Ut.</a></li>
<li><a href="">Reiciendis?</a></li>
<li><a href="">Velit?</a></li>
<li><a href="">Asperiores.</a></li>
<li><a href="">Velit?</a></li>
<li><a href="">Laudantium.</a></li>
<li><a href="">Incidunt!</a></li>
<li><a href="">Impedit?</a></li>
<li><a href="">Ipsam?</a></li>
<li><a href="">Suscipit!</a></li>
<li><a href="">Perspiciatis!</a></li>
<li><a href="">Doloribus.</a></li>
<li><a href="">Molestiae!</a></li>
<li><a href="">Eos.</a></li>
<li><a href="">Perferendis?</a></li>
</ul>
</div>
</div>
<div class="choose-item clearfix no-line">
<div class="left">年代:</div>
<div class="right">
<ul class="clearfix">
<li><a href="">全部</a></li>
<li><a href="">Consequuntur.</a></li>
<li><a href="">Aperiam!</a></li>
<li><a href="">Non?</a></li>
<li><a href="">Officia.</a></li>
<li><a href="">Ut.</a></li>
<li><a href="">Reiciendis?</a></li>
<li><a href="">Velit?</a></li>
<li><a href="">Asperiores.</a></li>
<li><a href="">Velit?</a></li>
<li><a href="">Laudantium.</a></li>
<li><a href="">Incidunt!</a></li>
<li><a href="">Impedit?</a></li>
<li><a href="">Ipsam?</a></li>
<li><a href="">Suscipit!</a></li>
<li><a href="">Perspiciatis!</a></li>
<li><a href="">Doloribus.</a></li>
<li><a href="">Molestiae!</a></li>
<li><a href="">Eos.</a></li>
<li><a href="">Perferendis?</a></li>
</ul>
</div>
</div>
</div>
<div class="movies clearfix">
<div class="movie-item">
<div class="poster">
<a href="">
<img src="./img/2.jpg" alt="" class="img1">
</a>
</div>
<div class="name">
<a href="">
你的婚礼
</a>
</div>
<div class="score">
9.2
</div>
</div>
<div class="movie-item">
<div class="poster">
<a href="">
<img src="./img/2.jpg" alt="" class="img1" class="img1">
</a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
<div class="movie-item">
<div class="poster">
<a href=""><img src="./img/2.jpg" alt="" class="img1"></a>
</div>
<div class="name"><a href="">复仇者联盟4:终局之战</a></div>
<div class="score">9.4</div>
</div>
</div>
<div class="pager">
<a href="">上一页</a>
<a href="">1</a>
<a href="">2</a>
<a href="" class="select">3</a>
<a href="">4</a>
<a href="">5</a>
<a href="">6</a>
<a href="">7</a>
<a href="">8</a>
<a href="">9</a>
<a href="">10</a>
<a href="">下一页</a>
</div>
</div>
</div>
</body>
</html>
movie.css
body {
color: #333;
}
.clearfix::after {
content: "";
display: block;
clear: both;
}
.main {
line-height: 1.5;
}
.main .nav {
height: 60px;
background: #47464a;
color: #999;
text-align: center;
line-height: 60px;
}
.main .nav a {
margin: 0 38px;
}
.main .nav a:hover {
color: #fff;
}
.main .nav a.select {
color: #ef4238;
}
.main .container {
width: 1120px;
margin: 0 auto;
}
.main .container .choose-area {
border: 1px solid #e5e5e5;
margin: 40px 0;
font-size: 14px;
line-height: 30px;
padding: 0 30px;
}
.main .container .choose-area .choose-item {
margin: 1em 0;
border-bottom: 1px dotted #e5e5e5;
}
.main .container .choose-area .choose-item.no-line {
border: none;
}
.main .container .choose-area .choose-item .left {
float: left;
color: #999;
}
.main .container .choose-area .choose-item .right {
float: left;
width: 1020px;
}
.main .container .choose-area .choose-item .right li {
float: left;
margin: 0 9px;
padding: 0 6px;
}
.main .container .choose-area .choose-item .right li:hover {
color: #ef4238;
}
.main .container .choose-area .choose-item .right li.select {
background: #ef4238;
color: #fff;
/* CSS3 圆角边框 */
border-radius: 12px;
}
.main .container .movies .movie-item {
float: left;
width: 160px;
margin: 10px 30px 10px 0;
}
.main .container .movies .movie-item:nth-child(6n) {
margin-right: 0;
}
.main .container .movies .movie-item .poster img {
width: 160px;
height: 220px;
}
.main .container .movies .movie-item .name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding: 0 2px;
text-align: center;
}
.main .container .movies .movie-item .score {
white-space: nowrap;
color: #ffb400;
text-align: center;
line-height: 2.5;
font-style: italic;
font-size: 20px;
}
.main .container .movies .movie-item .score::first-letter {
font-size: 1.5em;
}
comm.css
/* 多页面的通用样式 */
.pager {
margin: 2em 0;
text-align: center;
/* margin: 25px 25px; */
}
.pager a {
border: 1px solid #d8d8d8;
padding: 5px 10px;
margin: 10px 5px;
}
.pager a:hover {
border-color: #ef4238;
}
.pager a.select {
background: #ef4238;
color: #fff;
border: none;
}
reset.css
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
display: block;
}
body {
line-height: 1;
}
ol,
ul {
list-style: none;
}
blockquote,
q {
quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
a {
text-decoration: none;
color: inherit;
}
效果: