jQuery は垂直方向の半透明のアコーディオン効果を作成します

php中世界最好的语言
リリース: 2018-04-25 11:38:51
オリジナル
1720 人が閲覧しました

今回は、jQueryで縦方向の半透明アコーディオン効果を作成する方法を紹介します。jQueryで縦方向の半透明アコーディオン効果を作成するための注意点は何ですか?実際の事例を見てみましょう。

操作のレンダリング:

あなたに共有された jQuery の半透明ドロワー アコーディオン コードは次のとおりです

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery半透明抽屉式手风琴代码</title>
<style type="text/css">
*{margin:0;padding:0;list-style-type:none;}
a,img{border:0;text-decoration:none;}
body{font:12px/180% Arial, Helvetica, sans-serif, "新宋体";}
.pic{width:1100px;height:430px;margin:70px auto 0;}
.pic ul li{list-style:none;width:100px;height:429px;float:left;}
.pic .l1{background-image:url(img/1.jpg);}
.pic .l2{background-image:url(img/2.jpg);}
.pic .l3{background-image:url(img/3.jpg);}
.pic .l4{background-image:url(img/4.jpg);width:789px;}
.txt{width:100px; height:429px;background:#000;filter:alpha(opacity=50);background:rgba(0,0,0,.5);}
.txt p{color:#fff;font-family:"微软雅黑";float:left;position:relative;}
.txt .p1{font-size:12px;width:12px;margin:25px 25px 0 20px;}
.txt .p2{font-size:14px;width:14px;margin-top:25px;}
</style>
</head>
<body>
<p class="pic">
 <ul>
 <li class="l1">
  <a href="http://www.php.cn" target="_blank">
  <p class="txt">
   <p class="p1">作者 : 走天涯</p>
   <p class="p2">我的个人拉萨之旅||故事之城</p>
  </p>
  </a>
 </li>
 <li class="l2">
  <a href="http://www.php.cn" target="_blank">
  <p class="txt">
   <p class="p1">作者 : 走天涯</p>
   <p class="p2">我的个人拉萨之旅||故事之城</p>
  </p>
  </a>
 </li>
 <li class="l3"> 
  <a href="http://www.php.cn" target="_blank">
  <p class="txt">
   <p class="p1">作者 : 走天涯</p>
   <p class="p2">我的个人拉萨之旅||故事之城</p>
  </p>
  </a>
 </li>
 <li class="l4">     
  <a href="http://www.php.cn" target="_blank">
  <p class="txt">
   <p class="p1">作者 : 走天涯</p>
   <p class="p2">我的个人拉萨之旅||故事之城</p>
  </p>
  </a>
 </li>
 </ul>
</p>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
$(".pic ul li").hover(function(){
 $(this).stop(true).animate({width:"789px"},500).siblings().stop(true).animate({width:"100px"},500);
});
</script>
</body>
</html>
ログイン後にコピー
この記事の事例を読んだ後は、この方法を習得したと思います。さらに興味深い情報については、他のセクションに注目してください。関連記事はPHP中国語サイトにあります!

推奨読書:

JQuery はページを開いたときにランダムな選択の切り替えを実装します

jQuery は応答性の高い画像カルーセル効果を作成します

以上がjQuery は垂直方向の半透明のアコーディオン効果を作成しますの詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

関連ラベル:
ソース:php.cn
このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
最新の問題
人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート
私たちについて 免責事項 Sitemap
PHP中国語ウェブサイト:福祉オンライン PHP トレーニング,PHP 学習者の迅速な成長を支援します!