Re: [徵求] 會css的人
※ 引述《Sha1aa (。悅。)》之銘言:
: a.mainEntryBase{
: text-decoration: none}
: a.mainEntryBase:link {color:#99ccff}
: a.mainEntryBase:visited {color:#99ccff}
: a.mainEntryBase:active {color:#99ccff}
: a.mainEntryBase:hover {color:##9999FF}
: <p class="mainEntryBase">
: <a href="GOOGLE" rel="nofollow">http://www.google.com.tw">GOOGLE</a>
: </p>
: 我想要的是別地方網址有底線
: 但是在 class="mainEntryBase" 之中不要有底線 顏色也要不一樣
: 這樣做……但是那個網址還是有底線…
: 是哪裡有錯?
以上的 CSS 通通都錯。
你這樣的寫法是給 <a class="mainEntryBase" href="xxxxx">Google</a> 用的。
可是你現在是 <p class="mainEntryBase"><a .........></a></p>
所以你要寫的 CSS 要像這樣才對
p.mainEntryBase a {
text-decoration: none;
}
p.mainEntryBase a:link { }
p.mainEntryBase a:visited { }
p.mainEntryBase a:hover { }
p.mainEntryBase a:active { }
附帶一提,順序請用 link,visited,hover,active,才不會有奇怪問題產生。
--
╭──────我在 PIXNET 的 Blog ─────╮
│ http://blog.pixnet.net/Nelson │
└─────────────────────┘
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.138.145.16
→
04/24 16:28, , 1F
04/24 16:28, 1F
→
04/24 16:28, , 2F
04/24 16:28, 2F
討論串 (同標題文章)