gpt4 book ai didi

html - 如何使用html在一行上写单独的内容?

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

我是网络开发的新手,正在尝试创建此页面作为练习。 original page这是我的代码

<body bgcolor="white" <div width=1030px height=150px style="color: white;background-color:black ">
<p><i>DUNUKA</i></p>
<nav align="right">
<a href=" indexOld.html " style="text-decoration: none;color: white ">PORIFPLIO|</a>
<a href="about.html " style="text-decoration: none ;color: white ">ABOUT|</a>
<a href="contact.html " style="text-decoration: none;color: white ">CONTACT|</a>
</nav>
<br>
</div>
<div style="background-color: grey " width=1020px height=100px>
<br>
<p align="center "> Protfolio</p>
<br>
<hr />
<br>
</div>

<div height=800px width=1 010px>
<table border="0px " cellspacing="0px " bgcolor="white " width="1000px " height="320px ">
<tr align="center ">
<td><img src="p1.png " width="150px " height="130px " /></td>
<td><img src="p3.png " width="150px " height="130px " /></td>
<td><img src="p6.png " width="150px " height="130px " /></td>
</tr>
<tr align="center ">
<td><img src="p2.png " width="150px " height="130px " /></td>
<td><img src="p4.png " width="150px " height="130px " /></td>
<td><img src="p6.png " width="150px " height="130px " /></td>
</tr>
</table>
</div>

<div style="color: white;background-color: black " align="center " width=1020px height=200px>
<br />
<p>@All rights received</p>
<img src="google_plus_img.png " height="15px " width="15px " />
<img src="facebook_img.png " height="15px " width="15px " />
<img src="twitter_img.png " height="15px " width="15px " />
<img src="linkedin_img.png " height="15px " width="15px " />
<br />
<br />
</div>
</body>

这是我创建的页面的样子 my page

在原始图像中,文本 DINUKA 和链接 PORTFOLIO、ABOUT、CONTACT 出现在同一行(在页面的同一级别)但在我的页面上它们出现在两行上。我怎样才能使它们出现在同一条线?我是网络开发的新手

最佳答案

1) 在基本级别,您可以使用隔断线。 <br/>

2) 您可以使用 align:right div 内的 CSS 属性。

3) 您可以轻松地开始在您的代码中使用 Bootstrap-3/4,这将简化您的许多任务。

链接:https://getbootstrap.com/

关于html - 如何使用html在一行上写单独的内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47550480/

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