亲品藏
^
DreamWeaver cs6怎么让鼠标经过文字变色?DW鼠标经过非链接文字变颜色特效

  在使用DreamWeaver进行网页设计的过程中,经常会需要使用到一些鼠标经过的特效,这样设计出来的网页才更加的绚丽,今天这篇文章要给大家介绍的就是DreamWeaver cs6鼠标经过文字变色的特效实现方法,这里为大家提供了具体的代码,需要的网友可以拿去直接用或者学习一下。

  DW鼠标经过非链接文字变颜色实现代码:

  代码一:

  <style type="test/css">

  a:hover{color:#ff0000}

  </style>

  <a class=test>主页1</a>

  代码二:

  .div1 a:hover{color:#fef500;}

  .div2 a:hover{color:#f00;}

  <div class="div1">

  <a href="">鼠标滑过变黄色</a>

  </div>

  代码三:(显示十字线坐标参考线)


DreamWeaver cs6怎么让鼠标经过文字变色?DW鼠标经过非链接文字变颜色特效

  <html>

  <head>

  <title>鼠标十字线控制</title>

  <meta http-equiv="Content-Type" content="text/html; charset=gb2312">

  <style type="text/css">

  <!--

  #leftright{

  position:absolute;

  left:0;

  top:0;

  width:1px;

  height:1px;

  layer-background-color:black;

  background-color:#CC9900;

  z-index:100;

  font-size:0px;

  }

  #topdown { position:absolute;

  left:0;

  top:0;

  width:1px;

  height:1px;

  layer-background-color:black;

  background-color:#CC9900;

  z-index:100;

  font-size:0px;

  } a { color: #CC9900; text-decoration: none; cursor: default}

  a:hover { color: #FF0000; text-decoration: none; cursor: default}

  .article {

  BORDER-BOTTOM: black 1px solid; BORDER-  LEFT: black 1px solid; BORDER-  RIGHT: black 1px solid; BORDER-TOP: black 1px solid; FILTER: revealTrans(transition=23,duration=0.5) blendTrans(duration=0.5); POSITION: absolute; VISIBILITY: hidden

; padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; color: #CC9900}

-->

  </style>

  <meta http-equiv="Content-Type" content="text/html; charset=gb2312">

  <script language=JavaScript1.2>

  <!--

  function high(which2){

  theobject=which2

  highlighting=setInterval("highlightit(theobject)",50)

  }

  function low(which2){

  clearInterval(highlighting)

  which2.filters.alpha.opacity=40

  }

  function highlightit(cur2){

  if (cur2.filters.alpha.opacity<100)

  cur2.filters.alpha.opacity+=10

  else if (window.highlighting)

  clearInterval(highlighting)

  }

  function navChange(formName, popupName, target) {

  var popup = document[formName].elements[popupName];

  if (popup.options[popup.selectedIndex].value != "") {

  window.open(popup.options[popup.selectedIndex].value, target);

  popup.selectedIndex=0;

  }

  }

  function Show(divid) {

  divid.filters.revealTrans.apply();

divid.style.visibility = "visible";

divid.filters.revealTrans.play();

}

function Hide(divid) {

divid.filters.revealTrans.apply();

divid.style.visibility = "hidden";

divid.filters.revealTrans.play();

}

function MM_openBrWindow(theURL,winName,features) { //v2.0

window.open(theURL,winName,features);

}

//-->

</script>

<script language="JavaScript">

<!--

function tmt_LayerSlider(targetNN, targetIE, x, y, step, delay) {

var changed = false;

if (documentyers) {

target = eval(targetNN);

if (eval(target.moving)) {

clearTimeout(target.tmtSlide);

}

if (target.left > x) {

target.left -= eval(step);

changed = true;

}

if (target.left < x) {

target.left += eval(step);

changed = true;

}

if (target.top > y) {

target.top -= eval(step);

changed = true;

}

if (target.top < y) {

target.top += eval(step);

changed = true;

}

if (changed) {

target.moving = true;

target.tmtSlide = setTimeout("tmt_LayerSlider(\"" + targetNN + "\",\"" + targetIE + "\",\"" + x + "\",\"" + y + "\",\"" + step + "\",\"" + delay + "\")", delay);

} else {

target.moving = false;

}

} else {

if (document.all) {

IEobjStr = targetIE.replace("['", ".");

target = eval(IEobjStr.replace("']", ""));

if (eval(target.moving)) {

clearTimeout(target.tmtSlide);

}

if (target.style.pixelLeft > x) {

target.style.pixelLeft -= eval(step);

changed = true;

}

if (target.style.pixelLeft < x) {

target.style.pixelLeft += eval(step);

changed = true;

}

if (target.style.pixelTop > y) {

target.style.pixelTop -= eval(step);

changed = true;

}

if (target.style.pixelTop < y) {

target.style.pixelTop += eval(step);

changed = true;

}

if (changed) {

target.moving = true;

target.tmtSlide = setTimeout("tmt_LayerSlider(\"" + targetNN + "\",\"" + targetIE + "\",\"" + x + "\",\"" + y + "\",\"" + step + "\",\"" + delay + "\")", delay);

} else {

target.moving = false;

}

}

}

}

//-->

</script>

</head>

<body bgcolor="#000000" text="#FFCC00">

<span></span>

<div id="leftright" style="width:expression(document.body.clientWidth-2)"></div>

<div id="topdown" style="height:expression(document.body.clientHeight-2)"></div>

<div id="Layer1" style="position:absolute; left:328px; top:216px; width:50px; height:20px; z-index:101; visibility: hidden" class="article">text2

</div>

<div id="Layer2" style="position:absolute; left:328px; top:116px; width:50px; height:20px; z-index:102" class="article">text1</div>

<p> </p>

<p> </p>

<p> </p>

<table width="300" border="0" cellspacing="0" cellpadding="0" height="128">

 <tr>

   <td height="50" align="right" class="my001"><a href="####" onMouseOut="tmt_LayerSlider('documentyers[\'leftright\']','document.all[\'leftright\']','0','0','22','50');tmt_LayerSlider('documentyers[\'topdown\']','document.all[\'topdown\']','0','0','32','50');Hide(Layer2)" onMouseOver="tmt_LayerSlider('documentyers[\'leftright\']','document.all[\'leftright\']','0','150','22','50');tmt_LayerSlider('documentyers[\'topdown\']','document.all[\'topdown\']','260','0','32','50');Show(Layer2)" class="my001" onFocus="if(this.blur)this.blur()">放这里显示参考线1

     </a></td>

 </tr>

 <tr>

   <td height="120" align="right"><a href="####" onMouseOut="tmt_LayerSlider('documentyers[\'leftright\']','document.all[\'leftright\']','0','0','22','50');tmt_LayerSlider('documentyers[\'topdown\']','document.all[\'topdown\']','0','0','32','50');Hide(Layer1)" onMouseOver="tmt_LayerSlider('documentyers[\'leftright\']','document.all[\'leftright\']','0','223','22','50');tmt_LayerSlider('documentyers[\'topdown\']','document.all[\'topdown\']','260','0','32','50');Show(Layer1)" onFocus="if(this.blur)this.blur()">放这里显示参考线2

     </a></td>

 </tr>

</table>

<span></span> <span></span>

<p> </p>

<center>

</center>

</body>

</html>

相关阅读