gpt4 book ai didi

html - 将文章和部分并排放置 : display inline block not working

转载 作者:太空宇宙 更新时间:2023-11-03 19:10:04 25 4
gpt4 key购买 nike

在我网站的首页上,我想对该网站提供的内容进行简要说明,并在该简要说明旁边放上简短说明。所以我决定为前者使用一个文章标签,为后者使用一个部分。我虽然有一个 display: inline-block 可以把它们放在一起,但可惜事实并非如此。 (欢迎就如何做到这一点提出更好的建议,据我所知,我对 CSS3 没有添加干净的跨平台方法感到有点失望)

<body>
<style>

#description{
display: inline-block;
margin-right: 410px;
}


#register{
display: inline-block;
width:400px;
}


</style>
<section>
<article id="description">
lorem ipsum est
</article>
<section id="register">
registrationform
</section>
</section>

</body>

最佳答案

您的代码应该可以工作,至少在您的容器(或窗口)足够宽的情况下:

http://jsfiddle.net/9V8qP/

关于html - 将文章和部分并排放置 : display inline block not working,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8665767/

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