Javascript 响应图像不';t调整大小
目前,我正在创建一个网页与图像,我会喜欢响应渲染。我希望我的最后4张图片在保持大小的同时居中放置在彼此下方 我的代码到现在为止:Javascript 响应图像不';t调整大小,javascript,html,css,Javascript,Html,Css,目前,我正在创建一个网页与图像,我会喜欢响应渲染。我希望我的最后4张图片在保持大小的同时居中放置在彼此下方 我的代码到现在为止: <div id="banniere"> <img src="images/banniere.jpg" alt="FAST & FURIOUS 9"> </div> <div id="content"> <img src="images/Fond.jpg" alt="FAST & F
<div id="banniere">
<img src="images/banniere.jpg" alt="FAST & FURIOUS 9">
</div>
<div id="content">
<img src="images/Fond.jpg" alt="FAST & FURIOUS 9">
</div>
<div id="trailer">
<div>
<iframe max-width="640" src="https://www.youtube.com/embed/K_8jNjPOUqQ" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>
<div id="news">
<img src="images/photo-news.jpg" alt="FAST & FURIOUS 9">
</div>
<div id="texte">
<h3>FAST & FURIOUS 9 a été retardé d'un an</h3>
<p>
Universal Pictures a fait savoir que la sortie du neuvième volet de<br>
la franchise“Fast and Furious” a été repoussée d’un an.
</p>
<p>
Si la projection du film devait être lancée le 19 avril 2019, sa sortie<br>
au cinéma a été reportée au 10 avril 2020 – pendant le week-end<br>
pascal. Aucun réalisateur n’est associé au film pour le moment. La <br>
plupart des acteurs de la franchise rempile pour « Fast 9 »,dont<br>
Vin Diesel.
</p>
<p>
Après la sortie de “Fast & Furious 8” en début d’année, Universal <br>
a commencé à concocter une histoire pour un spin-off avec<br>Dwayne Johnson et Jason Statham pour commencer.
</p>
</div>
<ul id="acteur">
<li>
<img src="images/Dwayne-Johnson.jpg" alt="FAST & FURIOUS 9">
<p>
Dwayne Johnson
</p>
</li>
<li>
<img src="images/jordana_brewster.jpg" alt="FAST & FURIOUS 9">
<p>
Jordana Brewster
</p>
</li>
<li>
<img src="images/Michelle-Rodriguez.jpg" alt="FAST & FURIOUS 9">
<p>
Michelle Rodriguez
</p>
</li>
<li id="vin">
<img src="images/vin-diesel.jpg" alt="FAST & FURIOUS 9">
<p>
Vin Diesel
</p>
</li>
</ul>
#content {
min-width: 100%;
min-height: 100%;
position: absolute;
width:auto;
height:auto;
}
#trailer {
max-width: 1000px;
margin: auto;
}
#trailer div {
top: 60px;
position: relative;
padding-bottom: 56.25%;
padding-top: 30px;
height: 0;
overflow: hidden;
}
#trailer iframe,
#trailer object,
#trailerr embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
#news {
width:250px;
height:250px;
float: left;
margin-top: 95px;
position: relative;
padding-left: 180px;
display: block;
}
#texte {
font-family:"Antique-Olive";
font-size: 18px;
margin-left:546px;
margin-top: 75px;
float: right;
position: absolute;
color: white;
}
#texte h3 {
margin-left:10px;
}
#acteur {
font-family:"Antique-Olive";
font-size:20px;
margin-left: 40px;
padding-left: 80px;
margin-top: 425px;
}
#acteur li {
width:200px;
height:200px;
float: left;
list-style: none;
display: block;
padding-left: 65px;
position: relative;
}
#acteur img {
display: block;
position:relative;
z-index:1;
height:200px;
width:200px;
}
#acteur li p {
color: white;
margin-top:20px;
margin-left: 22px;
}
#acteur li#vin p {
margin-left: 60px;
}
@media screen and (max-width: 480px){
#texte {
float: none;
margin:50px auto;
height:180px;
}
#banniere {
height: 100px;
}
#texte h3,p {
font-size: 18px;
top: 10px;
left: 15px;
}
#acteur p {
font-size: 18px;
top: 60px;
left: 45px;
}
#news {
float: none;
margin:auto;
width: 250px;
height: 250px;
}
#acteur {
width:250px;
height:250px;
float:none;
margin:100px auto;
}
#acteur img {
width:230px;
}
}
@media screen and (max-width: 720px) {
#texte {
float: none;
margin:50px auto;
height:180px;
}
#banniere {
height: 100px;
}
#texte h3,p {
font-size: 18px;
top: 10px;
left: 15px;
}
#acteur p {
font-size: 18px;
top: 60px;
left: 45px;
}
#news {
float: none;
margin:auto;
width: 250px;
height: 250px;
}
#acteur {
width:250px;
height:250px;
float:none;
margin:100px auto;
}
#acteur img {
width:230px;
}
}
快速与狂暴9 aétédelayéd'un an
环球影业有限公司在新机场的飞行体验
洛杉矶专营权“快速和愤怒”的报道。
2019年,艾薇儿19日拍摄的电影放映,出动架次
《2020年艾薇儿十周年报告》——周末挂件
帕斯卡。奥肯·雷阿利萨特(Aucun réalisateur)是一部电影。La
《快速9》系列电影《快速9》,不
Vin柴油机。
4月,环球航空公司“快速与狂暴8”航班出动
一个由avec衍生出来的共同的历史事件
德韦恩·约翰逊和杰森·斯塔瑟姆共同发起。
-
德韦恩·约翰逊
-
乔达娜·布鲁斯特
-
米歇尔·罗德里格斯
-
Vin柴油机
#内容{
最小宽度:100%;
最小高度:100%;
位置:绝对位置;
宽度:自动;
高度:自动;
}
#拖车{
最大宽度:1000px;
保证金:自动;
}
#拖车室{
顶部:60px;
位置:相对位置;
垫底:56.25%;
填充顶部:30px;
身高:0;
溢出:隐藏;
}
#拖车iframe,
#拖车对象,
#跟踪嵌入{
位置:绝对位置;
排名:0;
左:0;
宽度:100%;
身高:100%;
}
#新闻{
宽度:250px;
高度:250px;
浮动:左;
边缘顶部:95px;
位置:相对位置;
左侧填充:180px;
显示:块;
}
#短信{
字体系列:“古董橄榄”;
字号:18px;
左边距:546px;
边缘顶部:75px;
浮动:对;
位置:绝对位置;
颜色:白色;
}
#文本h3{
左边距:10px;
}
#演员{
字体系列:“古董橄榄”;
字体大小:20px;
左边距:40px;
左侧填充:80px;
边缘顶部:425px;
}
#李演员{
宽度:200px;
高度:200px;
浮动:左;
列表样式:无;
显示:块;
左侧填充:65px;
位置:相对位置;
}
#国际营销代理{
显示:块;
位置:相对位置;
z指数:1;
高度:200px;
宽度:200px;
}
#李平律师{
颜色:白色;
边缘顶部:20px;
左边距:22px;
}
#李文平律师{
左边距:60像素;
}
@媒体屏幕和屏幕(最大宽度:480px){
#短信{
浮动:无;
保证金:50px自动;
高度:180像素;
}
#班尼埃{
高度:100px;
}
#文本h3,p{
字号:18px;
顶部:10px;
左:15px;
}
#演员p{
字号:18px;
顶部:60px;
左:45像素;
}
#新闻{
浮动:无;
保证金:自动;
宽度:250px;
高度:250px;
}
#演员{
宽度:250px;
高度:250px;
浮动:无;
保证金:100像素自动;
}
#国际营销代理{
宽度:230px;
}
}
@媒体屏幕和屏幕(最大宽度:720px){
#短信{
浮动:无;
保证金:50px自动;
高度:180像素;
}
#班尼埃{
高度:100px;
}
#文本h3,p{
字号:18px;
顶部:10px;
左:15px;
}
#演员p{
字号:18px;
顶部:60px;
左:45像素;
}
#新闻{
浮动:无;
保证金:自动;
宽度:250px;
高度:250px;
}
#演员{
宽度:250px;
高度:250px;
浮动:无;
保证金:100像素自动;
}
#国际营销代理{
宽度:230px;
}
}
目前,我正在创建一个网页与图像,我会喜欢响应渲染。我希望我的最后4张图像在保持大小的同时居中放置在彼此下方。添加
显示:块
和边距:0自动
到您的img标签中会起作用,添加最大宽度:100%
会在图像变大屏幕时调整图像大小
#内容{
最小宽度:100%;
最小高度:100%;
位置:绝对位置;
宽度:自动;
高度:自动;
}
#拖车{
最大宽度:1000px;
保证金:自动;
}
#拖车室{
顶部:60px;
位置:相对位置;
垫底:56.25%;
填充顶部:30px;
身高:0;
溢出:隐藏;
}
#拖车iframe,
#拖车对象,
#跟踪嵌入{
位置:绝对位置;
排名:0;
左:0;
宽度:100%;
身高:100%;
}
#新闻{
宽度:250px;
高度:250px;
浮动:左;
边缘顶部:95px;
位置:相对位置;
左侧填充:180px;
显示:块;
}
#短信{
字体系列:“古董橄榄”;
字号:18px;
左边距:546px;
边缘顶部:75px;
浮动:对;
位置:绝对位置;
颜色:白色;
}
#文本h3{
左边距:10px;
}
#演员{
字体系列:“古董橄榄”;
字体大小:20px;
左边距:40px;
左侧填充:80px;
边缘顶部:425px;
}
#李演员{
宽度:200px;
高度:200px;
浮动:左;
列表样式:无;
显示:块;
左侧填充:65px;
位置:相对位置;
}
#国际营销代理{
显示:块;
位置:相对位置;
z指数:1;
高度:200px;
宽度:200px;
}
#李平律师{
颜色:白色;
边缘顶部:20px;
左边距:22px;
}
#李文平律师{
左边距:60像素;
}
@媒体屏幕和屏幕(最大宽度:480px){
#短信{
浮动:无;
保证金:50px自动;
高度:180像素;
}
#班尼埃{
高度:100px;
}
#文本h3,p{
字号:18px;
顶部:10px;
左:15px;
}
#演员p{
字号:18px;
顶部:60px;
左:45像素;
}
#新闻{
浮动:无;
保证金:自动;
宽度:250px;
高度:250px;
}
#演员{
宽度:250px;
高度:250px;
浮动:无;
保证金:100像素自动;
}
#国际营销代理{
宽度:230px;
}
}
@媒体屏幕和屏幕(最大宽度:720px){
#短信{
浮动:无;
保证金:50px自动;
高度:180像素;
}
#班尼埃{
高度:100px;
}
#文本h3,p{
字号:18px;
顶部:10px;
左:15px;
}
#演员p{
字号:18px;
顶部:60px;
左:45像素;
}
#新闻{
浮动:无;
保证金:自动;
宽度:250px;
高度:250px;
}
#演员{
宽度:250px;
高度:250px;
浮动:无;
保证金:100像素自动;
}
#国际营销代理