gpt4 book ai didi

CSS 放置示例(标题、图像、文本和阅读更多链接)

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

假设我有以下设计要切片:

enter image description here

如何通过不使用 div 的绝对位置和不使用表格布局(如果它们完全可以称为布局 :))来切片它?

最佳答案

我认为它会像这样的 jsFiddle:

http://jsfiddle.net/cFqDX/

<html>
<body>
<div class="mainbody">
<h1>Some title</h1>
<img src="http://i.stack.imgur.com/u8Wbq.png" class="leftimage"/>
<p>
Putting a lot of text here.
Putting a lot of text here.
Putting a lot of text here.
Putting a lot of text here.Putting a lot of text here.
Putting a lot of text here.
Putting a lot of text here.
Putting a lot of text here.
Putting a lot of text here.
</p>
</div>
</body>
</html>

还有 css。

.mainbody
{
background-color:gray;
width:800px;
height:300px;
}

.leftimage
{
margin:10px;
float:left;
}

这给了我下面的图像: enter image description here

关于CSS 放置示例(标题、图像、文本和阅读更多链接),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7920514/

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