作者NelsonT (闪光有益身体健康)
看板Blog
标题Re: [徵求] 会css的人
时间Tue Apr 24 16:02:10 2007
※ 引述《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="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
1F:→ Sha1aa: 了解 04/24 16:28
2F:→ Sha1aa: 原来还有这样的 笔记 04/24 16:28