【发布时间】:2013-05-10 07:23:37
【问题描述】:
代替
<style> some css code</a>
然后使用
<a href="mylink" class="some class">anchor</a>
我想用这样的东西:
<a href="mylink" style="something">anchor</a>
那么我如何将这个 css 转换成这样的形式(东西):
<style>
.twitterbird {
margin-bottom: 10px;
width: 160px;
height:160px;
display:block;
background:transparent url('twitterbird.png') center top no-repeat;
}
.twitterbird:hover {
background-image: url('twitterbird_hover.png');
}
</style>
【问题讨论】:
-
你不能 use pseudo-classes 在内联样式中,但在你的例子中一切都是可能的。
-
为什么你想这样做?
-
你为什么要这样做?
-
你的意思是我不能使用悬停?
-
不幸的是,不只是 CSS .. :(
标签: html css button hyperlink href