【发布时间】:2022-01-15 02:40:40
【问题描述】:
CSS 确实是一门可爱的语言。我正在尝试将我的第一个登录页面创建为个人项目,现在我一直在尝试编辑锚标签/超链接。这里的问题是,无论我做什么,我都无法删除项目符号点(列表样式),更改字体颜色(颜色),将文本更改为内联(显示)然后删除下划线(文本装饰)。
HTML:
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Landing Page</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Luxurious+Roman&family=Luxurious+Script&family=Roboto:wght@100&family=The+Nautigal&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<nav class="navbar">
<label class="logo">Placeholder</label>
<ul id="links">
<li><a href="landingpage.html">Link one</a></li>
<li><a href="landingpage.html">Link two</a></li>
<li><a href="landingpage.html">Link three</a></li>
</ul>
</nav>
</header>
</body>
</html>
CSS:
body {
margin: 0;
padding: 0;
box-sizing: border-box;
}
nav {
background: #1f2937;
height: 70px;
width: 100%;
color: white;
padding-top: 20px;
padding-bottom: 10px;
display: flex;
}
.logo {
font-size: 2.5rem;
font-family: Luxurious Roman;
}
nav ul li a {
color: white;
list-style: none ;
text-decoration: none;
background-color: royalblue;
display: inline;
}
【问题讨论】:
标签: html css hyperlink css-selectors anchor