【发布时间】:2016-09-18 08:35:51
【问题描述】:
div:preview-movie 没有占用其余的宽度。
iTunes div 在大屏幕上过度缩放。
在小屏幕上,如何让 logo div 变小,而 details-movie div 会下沉。
谢谢
HTML 代码:
<!DOCTYPE html>
<html>
<head>
<title>Page-movie-x</title>
<link rel="stylesheet" href="page-film.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<META HTTP-EQUIV="refresh" CONTENT="15">
</head>
<body>
<div class="dropdown-menu">
<p>
menu dropdown
</p>
</div>
<div class="container">
<div class="logo">
<div class="movie-name">
A Name
</div>
<img class="Itunes-link" src="http://dxm2idf2u6bml.cloudfront.net/rest/serve/THUMBNAILS/55b856e3-c26f-416f-ac65-c588230582ee.jpg" >
<div class="date-out">
Date de sortie : / /
</div>
<div class="rating">
<span>☆</span><span>☆</span><span>☆</span><span>☆</span><span>☆</span>
</div>
</div>
<div class="details-movie">
<div class="description-movie">
</div>
<div class="preview-movie">
<iframe class="youtube-vid" src="https://www.youtube.com/embed/eEZ0u9xI2yo" ></iframe>
</div>
</div>
</div>
</body>
</html>
CSS 代码:
.container{
display:flex;
}
.dropdown-menu{
width: 100%;
height: 5vh;
background-color: blue;
}
.logo{
max-width: 300px;
height: 100vh;
background-color: red;
}
.details-movie{
height: 100vh;
width: 100vh;
background-color: grey;
}
.movie-name{background-color: yellow;}
.Itunes-link{
height: 30%;
max-width: 300px;
max-height: 300px;
background-color: green;
}
body{
width: 100%;
height: 100%;
}
.rating > span:hover:before {
content: "\2605";
position: absolute;
}
.description-movie{height:32%;
background-color: white;
}
.preview-movie{
display: flex;
width: 100vh;
}
.preview-movie .youtube-vid{
justify-content: center;
width: 100%;
height: 100%;
height: auto;
}
【问题讨论】:
标签: javascript html css responsive-design responsive