gpt4 book ai didi

html - 让标签转到右边?

转载 作者:可可西里 更新时间:2023-11-01 13:17:38 24 4
gpt4 key购买 nike

这是我到目前为止所做的:

<html>
<head>
<style>

/* Tabs */
#navlist {
padding: 3px 0;
margin-left: 0;
border-bottom: 1px solid #778;
font: bold 12px Verdana, sans-serif;
/* WARNING: when using font-size/font-family instead of font,
do not forget to set line-height:normal otherwise 1px more is shown
between tabs and their bottom line in IE8 and FF3.6 */
}

#navlist li {
list-style: none;
margin: 0;
display: inline;
}

#navlist li a {
padding: 3px 0.5em;
margin-left: 0px;
border: 1px solid #778;
border-bottom: none;
background: #DDE;
text-decoration: none;
}

#navlist li a:link { color: #448; }
#navlist li a:visited { color: #667; }

#navlist li a:hover {
color: #000;
background: #AAE;
border-color: #227;
}

#navlist li a#current {
background: white;
border-bottom: 1px solid white;
}
</style>
</head>
<body>
<div id="navcontainer">
<ul id="navlist">
<li><a id="current" href="#">Col1</a></li>
<li><a href="#">Col2</a></li>
<li><a href="#">Col3</a></li>
</ul>
</div>
</body>
</html>​

并保存到http://jsbin.com/uvako3/2 .感谢您的帮助

最佳答案

只需将 text-align: right; 添加到 #navlist CSS。

说明:您正在使您的列表项内联元素。这使它们遵循适用于文本的一般规则。因此,通过简单地设置文本对齐方式,您可以指定内联元素对齐的位置。

关于html - 让标签转到右边?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4168216/

24 4 0
文章推荐: html - W3 因
文章推荐: c - Zephir 是否可以包含外部库?
文章推荐: php - ICU:音译然后删除所有非字母数字字符
文章推荐: html - css 中的
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com