我正在制作一个新网站,并且正在使用 Dreamweaver。我遇到的一个问题是我的链接在 safari 中聚集在一起。这是它在 Firefox
中的样子它很好但不幸的是这是它在 Safari
中的样子
我正在使用 Dreamweaver 开发网站,上面页面的 CSS 看起来像这样
#header {
background-image: url(bg02.jpg);
height: 10em;
color: #FFF;
font-size: 1em;
text-align: center;
padding: 0em;
margin-top: -2em;
margin-right: 0em;
margin-bottom: 0em;
margin-left: 0em;
width: auto;
}
#header h1 {
font-size: 4em;
letter-spacing: 0.1em;
padding-top: 0.4em;
padding-right: 0em;
padding-bottom: 0em;
padding-left: 0.8em;
text-align: center;
display: block;
}
#header a {
color: #468CEA;
text-decoration: none;
display: compact;
font-size: 1em;
margin-top: -2em;
text-align: center;
}
无论如何希望有人能帮助我。非常感谢您看到这里!
最佳答案
不要使用 display: compact
(这几乎不受支持),请尝试使用 display: inline-block
然后使用填充:
#header a {
color: #468CEA;
text-decoration: none;
display: inline-block;
padding: 0 5px; /* Change this to whatever suits your needs */
font-size: 1em;
margin-top: -2em;
text-align: center;
}
关于html - Safari 中的链接聚集在一起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15674393/