gpt4 book ai didi

html - 带 Div 的导航栏

转载 作者:行者123 更新时间:2023-11-28 07:29:38 25 4
gpt4 key购买 nike

我想用 Divs 制作一个导航栏,但我不知道如何并排放置链接。有人愿意帮助和/或向我解释吗?添加填充词,因为它不会让我发帖。 Lorem Ipsum ad usu quem delectus, sea stet sale id. Nulla nostrud appetere 缓和了。 Ne nam accumsan verterem,ex mea cetero voluptaria。在 vel latine labores splendide。 Justo atomorum est cu, bonorum maiestatis ea sit。他的 nobis tractatos, sea ut possit vidisse, quodsi quaestio vim ne。一个 eum liber persecuti,duo patrioque consetetur ad,duo et sonet populo。

Eligendi appellantur voluptatibus 具有 ea, eam eu putent constituto efficiantur。 Vidit accusam liberavisse ad eum。 Ne vel dicit soluta, exerci aliquam principes ius ea. Ius ut illum aeterno, ius officiis corrumpit ne, ut ancillae patrioque ius. Sea et maiorum apeirian, tritani concludaturque eam ad.

HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>My website</title>
<link rel="stylesheet" type="text/css" href="../Web Design 3/stylesheet.css" />
</head>

<body>
<div class="headbar">
<div class="navigation">
<div class="Home"><a href="#">Home</a></div>
<div class="About"><a href="#">About</a></div>
<div class="Products"><a href="#">Products</a></div>
<div class="Contact"><a href="#">Contact</a></div>
</div>
<div class="logo">

</div>
</div>
</body>
</html>

CSS

@charset "UTF-8";
/* Stylesheet */

* {
padding: 0px;
margin: 0px;
}

.headbar {
width: 100%;
height: 75px;
background: black;
opacity: 0.5;
}

.navigation {
float:right;
height: 50px;
width: 500px;
top: 6.5px;
}

.Home {
height: 50px;
}

最佳答案

添加这个

.navigation div
{
display:inline;
}

fiddle :https://jsfiddle.net/peb55sza/

关于html - 带 Div 的导航栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31605313/

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