欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jQuery實(shí)現(xiàn)邊框動態(tài)效果的實(shí)例代碼

 更新時(shí)間:2016年09月23日 11:50:27   投稿:daisy  
這篇文章給大家分享了一個(gè)jQuery邊框動態(tài)的效果,當(dāng)鼠標(biāo)移動到邊框區(qū)域的時(shí)候,邊框會有個(gè)動態(tài)的加載動畫效果,實(shí)現(xiàn)的效果真的非常不錯,下面來一起看看吧。

話不多說、靜態(tài)效果圖如下

實(shí)代碼如下

<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <title></title>
 <style>
 .myDiv{
  width: 300px;
  height: 200px;
  border: 1px solid rgba(0,0,0,0.2);
  margin: 50px ;
  position: relative;
 }
 .topLine{
  width: 0px;
  height: 1px;
  background: black;
  position:absolute;
  left: 0;
  top: -1px;
 }
 .bottomLine{
  width: 0px;
  height: 1px;
  background: black;
  position:absolute;
  left: 0;
  bottom: -1px;
 }
 .leftLine{
  width: 1px;
  height: 0px;
  background: black;
  position:absolute;
  left: -1;
  bottom: -1px;
 }
 .rightLine{
  width: 1px;
  height: 0px;
  background: black;
  position:absolute;
  right: -1px;
  top: -1px;
 }
 </style>
</head>
<body>
 <div class="myDiv">
 <div class="topLine"></div>
 <div class="rightLine"></div>
 <div class="bottomLine"></div>
 <div class="leftLine"></div>
 </div>
 <div class="myDiv">
 <div class="topLine"></div>
 <div class="rightLine"></div>
 <div class="bottomLine"></div>
 <div class="leftLine"></div>
 </div>
 <script type="text/javascript" src='http://libs.baidu.com/jquery/2.0.0/jquery.js'></script>
 <script>
 $(function(){
  $(".myDiv").mouseover(function(){
  $(this).find(".topLine,.bottomLine").stop().animate({"width":"300px"});
  $(this).find(".rightLine,.leftLine").stop().animate({"height":"200px"});
   
  })
  $(".myDiv").mouseout(function(){
  $(this).find(".topLine,.bottomLine").stop().animate({"width":"0px"});
  $(this).find(".rightLine,.leftLine").stop().animate({"height":"0px"});
  })
 })
 </script>
</body>
</html>

總結(jié)

以上就是這篇文章的全部內(nèi)容了,剛興趣的朋友們可以自己動手操作下看看動態(tài)效果,真的非常不錯,希望對大家的學(xué)習(xí)或者工作能有一定的幫助。如果有疑問大家可以留言交流,小編會盡快給大家回復(fù)。

相關(guān)文章

最新評論