我想有两个相邻的按钮。我在外部 css 中使用下面的代码,但它们不会彼此相邻(参见图像电流输出)。我该怎么做?
谢谢您的帮助!
.about {
color: lightpink;
text-align: center;
font-size: 400%;
font-family: fantasy; copperplate;
float: left;
width: 75%;
}
.shop {
color: lightpink;
text-align: center;
font-size: 400%;
font-family: fantasy; copperplate;
float: right;
width: 75%;
}
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Webpage</title>
<link rel="stylesheet" href="indexstyle.css" type="text/css">
</head>
<body>
<p class="about about1">ABOUT</p>
<p class="shop shop1">SHOP</p>
</body>
</html>