鼠标放上去超链接的文字逐个加色效果
程序员文章站
2022-06-19 16:12:49
link.htc复制代码 代码如下:
link.htc
<public:component>
<public:attach event="onmouseover" onevent="domouseover()">
<public:attach event="onmouseout" onevent="domouseout()">
<script language="javascript">
function domouseover(){
with(element)
{filters.item(0).apply();filters.item(0).play();}}
function domouseout(){
with(element){
filters.item(0).apply();
filters.item(0).play();}}
</script>
</public:component>
css文件中的调用方法
a {
filter: progid:dximagetransform.microsoft.gradientwipe(duration=1); behavior: url(jcss/link.htc); height: 1px; text-decoration: none
}
复制代码 代码如下:
<public:component>
<public:attach event="onmouseover" onevent="domouseover()">
<public:attach event="onmouseout" onevent="domouseout()">
<script language="javascript">
function domouseover(){
with(element)
{filters.item(0).apply();filters.item(0).play();}}
function domouseout(){
with(element){
filters.item(0).apply();
filters.item(0).play();}}
</script>
</public:component>
css文件中的调用方法
复制代码 代码如下:
a {
filter: progid:dximagetransform.microsoft.gradientwipe(duration=1); behavior: url(jcss/link.htc); height: 1px; text-decoration: none
}