zoukankan
html css js c++ java
CSS中,脚本不能覆盖CSS的!!!
代码如下:
<
style
type
="text/css"
>
div#overCamp a
{
}
{
color
:
#00368f
;
text-decoration
:
none
;
cursor
:
crosshair
}
.MouseOver
{
}
{
color
:
Red
;
font-weight
:
bold
;
cursor
:
pointer
;
}
.MouseOut
{
}
{
color
:
Black
;
font-weight
:
normal
;
color
:
#00368f
;
}
</
style
>
<
div
id
="overCamp"
style
="POSITION: absolute; TEXT-ALIGN: center"
name
="overCamp"
>
<
a
id
="human"
onmouseover
="this.className = 'MouseOver';"
onmouseout
="this.className='MouseOut' ;"
>
Alliance
</
a
>
<
br
>
<
a
id
="animal"
onmouseover
="this.className = 'MouseOver';"
onmouseout
="this.className='MouseOut' ;"
>
Horde
</
a
>
</
div
>
这样,在Div#overCamp a 和 .MouseOver 同时出现的属性,不会反映在 .MouseOver 中,即使,事实上也是,脚本控制的类 .MouseOver 在 后面被执行.
把CSS中的Div#overCamp a 改为 div a ,后者就会覆盖前者.
Why?
作者:
NewSea
出处:
http://newsea.cnblogs.com/
QQ,MSN:
iamnewsea@hotmail.com
如无特别标记说明,均为NewSea原创,版权私有,翻载必纠。欢迎交流,转载,但要在页面明显位置给出原文连接。谢谢。
查看全文
相关阅读:
BZOJ 1907: 树的路径覆盖
BZOJ 1295: [SCOI2009]最长距离
BZOJ 1303: [CQOI2009]中位数图
BZOJ 1468: Tree
BZOJ 3784: 树上的路径
BZOJ 2006: [NOI2010]超级钢琴
BZOJ 1831: [AHOI2008]逆序对
BZOJ 2521: [Shoi2010]最小生成树
HDU 6685 Rikka with Coin (枚举 思维)
HDU 6659 Acesrc and Good Numbers (数学 思维)
原文地址:https://www.cnblogs.com/newsea/p/545781.html
最新文章
伯努利数
WC2019 数树
CF923E
CF1392I
CF1392G
ZJOI2019 开关
ZJOI2019 麻将
[PKUWC2018]随机算法
LeetCode-Convert Sorted List to Binary Search Tree
LeetCode-Merge k Sorted Lists
热门文章
LeetCode-Merge Sorted Array
LeetCode-Triangle
LeetCode-Merge Two Sorted Lists
LeetCode-Two Sum
LeetCode-Longest Substring Without Repeating Characters
LeetCode-Longest Palindromic Substring
LeetCode-Rotate Image
LeetCode-N-Queens
BZOJ 3714: [PA2014]Kuglarz
BZOJ 1587: 叶子合并leaves
Copyright © 2011-2022 走看看