gpt4 book ai didi

CSS,连续图片库,每张图片之间的空间,

转载 作者:行者123 更新时间:2023-11-28 13:02:29 24 4
gpt4 key购买 nike

您好,我想在连续的图片和列中的图片之间添加一些空间。这是我的代码。如果您能指出正确的方向,我将不胜感激

<!DOCTYPE>
<html>
<head>
<style type="text/css">

body
{
background-color:#abe9ff;
}
.container {
width: 950px; /* look i'm now showing 4 images per line */
margin-left: 10px;
margin-right: 10px;
}
.img {
/* height: 234px; width: 218px; */
float: left;
margin-top: 10px;
margin-left: 30px;
margin-right: 10px;

}
</style>

<body>
<div class="container">
<div img src="interpret_1.png" alt="Interpret1" width="218" height="234" href="boywonder.htm">
<img src="interpret_1.png" alt="Interpret1" width="218" height="234" href="boywonder.htm">
<img src="interpret_1.png" alt="Interpret1" width="218" height="234" href="boywonder.htm">
<img src="interpret_1.png" alt="Interpret1" width="218" height="234" href="boywonder.htm">
<img src="interpret_1.png" alt="Interpret1" width="218" height="234" href="boywonder.htm">



</body>
</html>

最佳答案

使用这个 html

<body >

<div id="wrapper">

<div class="container">

<img class="image" src="interpret_1.png" alt="Interpret1" width="218" height="234" href="boywonder.htm">
<img class="image" src="interpret_1.png" alt="Interpret1" width="218" height="234" href="boywonder.htm">
<img class="image" src="interpret_1.png" alt="Interpret1" width="218" height="234" href="boywonder.htm">
<img class="image" src="interpret_1.png" alt="Interpret1" width="218" height="234" href="boywonder.htm">
<img class="image" src="interpret_1.png" alt="Interpret1" width="218" height="234" href="boywonder.htm">
</div>



</div>


</body>

css 就像

body{   margin:0 5px;
}


#wrapper
{
background-color:#abe9ff;
height:500px;}

.container { width:950px;
margin-left: 10px;
margin-right: 10px;
}


.image{
height: 234px; width: 218px;
float: left;
margin-top:10px;

margin-right: 19px;}

关于CSS,连续图片库,每张图片之间的空间,,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16080573/

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