完全不知所措!我試着用幾種不同的方式重寫text-decoration: none
。我也設法重新確定文字的大小,但text-decoration: none
代碼不會。文字裝飾:無所謂
非常感謝。
代碼
.widget
{
height: 320px;
width: 220px;
background-color: #e6e6e6;
position: relative;
overflow: hidden;
}
.title
{
font-family: Georgia, Times New Roman, serif;
font-size: 12px;
color: #E6E6E6;
text-align: center;
letter-spacing: 1px;
text-transform: uppercase;
background-color: #4D4D4D;
position: absolute;
top: 0;
padding: 5px;
width: 100%;
margin-bottom: 1px;
height: 28px;
text-decoration: none;
}
a .title
{
text-decoration: none;
}
<a href="#">
<div class="widget">
<div class="title">Underlined. Why?</div>
</div>
</a>
您的文本沒有爲我加下劃線。 – 2012-07-10 18:57:46
你使用什麼瀏覽器? – jfrej 2012-07-10 18:57:59
我與尼古拉,沒有強調。另外,發佈演示時請考慮整理您的空白空間;我們的目標是讓我們可以輕鬆地進行演示,查看和閱讀。此外,嵌套在「a」元素中的'div'在HTML5之外是無效的,因此在使用該構造時請確保您的文檔類型。 – 2012-07-10 18:58:04