我需要在中心对齐一个“a”元素
HTML 代码:
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<link href='http://fonts.googleapis.com/css?family=Cedarville+Cursive' rel='stylesheet' type='text/css'>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<h1>Olive</h1>
<a href="page1.html">Enter</a>
</body>
</html>
CSS 代码:
body {
background-color: olive;
}
h1 {
font-family: 'Cedarville Cursive', cursive;
font-size: 230px;
text-align: center;
}
a {
font-family: 'Cedarville Cursive', cursive;
color: white;
font-size: 100px;
text-decoration: none;
}
我在 CSS 表的“a”元素中使用了“text-align”,但它没有改变。