gpt4 book ai didi

html - 奇怪的图像调整大小问题

转载 作者:行者123 更新时间:2023-11-28 16:56:40 26 4
gpt4 key购买 nike

我无法让顶部图像适合 div。我试过查看此站点上的其他问题,但没有人真正回答这个问题。我已经为每个图像尺寸将其设置为 100%,但它们仍然不会锁定到它们所在的 div

.html

<body>
<div class="container">
<div class="header">
<div class="navbar">
<ul>
<li>HOME</li>
<li>GALLERY</li>
<li>EVENTS</li>
<li>SHOP</li>
<li>ABOUT</li>
</ul>
</div>
</div>
<div class="eventbar">
<div class="events">
<article>
<div class="image"><img class="icono" src="http://placehold.it/120x120">
</div>
<div class="text">
<h1 style="margin-bottom:-20px;">Event 1</h1>
<p>this is this is placeholder text websites are fun and i like to make them. although they are freakin </p>
</div>
</article>
</div>

<div class="newimages">
<h1 class="imgtext">This is a catchy tagline</h1>
<div><img class="r-image"src="http://placehold.it/800x400">
</div>
<p>this image is about yada yada and it was featured on yada yada. and now i would like to formally present it to you the aeophex family</p>
</div>

.css

@charset "utf-8";
/*sectionized*/
body{
margin:0px;
padding:0px;
font-family:sans-serif}
.container{}

/*header*/
.header{
background-color:#FFF;}
.aeologo{
margin-bottom:-13px;
margin-left:-8px;
}
.navbar{
margin-left:-50px;}
.navbar ul li{
display:inline;
padding-left:10px;}
/*header*/

/*events*/
.eventbar{
padding-bottom: 12px;
padding-top: 5px;
}
.events{
background-color: #06F;
padding-bottom: 19px;
padding-top: 3px;
}
.events article{
padding:10px;
display:inline;
padding-bottom:5px;}
/*events*/

.newimages{}

/*elements*/
.r-image{
padding:15px;
min-width: 25%;
max-width: 95%;
width: 95%;
}
.icono{
float: left;
padding: 2px inherit;
padding-right: 10px;
padding-left: 5px;
max-width: 100%;
min-width: 25%;
}

最佳答案

显示您的事件文章 inline-block 而不是 inline 瞧!

fiddle

关于html - 奇怪的图像调整大小问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32000022/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com