gpt4 book ai didi

html - 我正在尝试使用 CSS 样式显示 : inline-block; with 2
but they are not displaying right next to each other

转载 作者:行者123 更新时间:2023-12-02 16:02:04 24 4
gpt4 key购买 nike

<分区>

下面是我的 HTML 和 CSS 片段。

 <!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">
<style>
*{
margin: 0;
padding: 0;
}
.box1{
background-color: seagreen;
display: inline-block;
margin: 5px;
padding: 4px;
width: 433px;
height: 233px;
border: 2px solid black;

}
.box2{
background-color: sienna;
display: inline-block;
margin: 5px;
padding: 5px;
width: 433px;
height: 233px;
border: 2px solid black;
}
</style>
<title>Asspend21</title>
</head>
<body>
<div class="box1">Lorem ipsum dolor sit amet consectetur adipisicing elit. Quasi, molestiae cupiditate voluptatibus recusandae quibusdam ad, iure ratione consequuntur magni doloremque vel nemo eius magnam placeat saepe aspernatur ex? Molestias itaque ex voluptatem sit, minima incidunt nulla facilis dolores accusant!</div>
<div class="box2">Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem harum laudantium sapiente quos eos nam officiis et laborum fuga minus dolore vitae error quia corporis amet, labore temporibus ex soluta quod laboriosam beatae optio maiores, eum illum. Voluptatibus, hic aperiam eaque quam obcaecati nemo minima tempore dolorem similique impedit, harum magni quis ducimus veritatis id saepe</div>
</body>
</html>

就这样来了。 Image01

即使删除了 padding 和 margin,它仍然显示相同。解决问题需要什么?这里有什么问题?

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