第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定

信息列表制作--手風(fēng)琴效果

標(biāo)簽:
Html/CSS JQuery JavaScript

纯CSS实现手风琴效果1:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>list</title>
    <style>
        *{ margin: 0;padding: 0;font-size: 15px; }
        .list{width: 400px; height: 180px;border: 1px solid #000;}
        .title{height: 30px; background: rgba(204, 202, 204, 0.56); padding-left: 10px; line-height: 30px;}
        ul li{list-style: none;padding-left: 10px;border-bottom: 1px dotted #000000;line-height: 30px;color: darkslateblue; }
        span{width: 25px;height: 25px;background-color: red;display: inline-block;text-align: center; line-height: 25px;}
        ul li dl {padding-left: 37px;display: none; }
        ul li:hover dl{display: block; }
    </style>
</head>
<body>
<div class="list">
    <h3 class="title">阅读排行</h3>
    <ul>
        <li><span></span>舌尖上的中国:传世美味完全攻略
        <dl>
            <dt>舌尖上的中国</dt>
            <dd>作者:本书编写组</dd>
            <dd>价格:</dd>
        </dl></li>
        <li><span></span>完全图解狗的心理</li>
        <li><span></span>左手婚姻,右手爱情</li>
        <li><span></span>假如给我三天光明(电子书)</li>
    </ul>
</div>
</body>
</html>

纯CSS实现手风琴效果2:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>list</title>
    <style>
        *{ margin: 0;padding: 0;font-size: 15px; }
        .list{width: 400px; height: 180px;border: 1px solid #000;}
        .title{height: 30px; background: rgba(204, 202, 204, 0.56); padding-left: 10px; line-height: 30px;}
        ul li{list-style: none;padding-left: 10px;border-bottom: 1px dotted #000000;line-height: 30px;color: darkslateblue; }
        span{width: 25px;height: 25px;background-color: red;display: inline-block;text-align: center; line-height: 25px;}
        ul li dl {padding-left: 37px;display: none; }
    </style>
</head>
<body>
<div class="list">
    <h3 class="title">阅读排行</h3>
    <ul>
        <li onmouseover="document.getElementById('detail').style.display='block'"
        onmouseout="document.getElementById('detail').style.display='none'">
            <span></span>舌尖上的中国:传世美味完全攻略
            <dl id="detail">
                <dt>舌尖上的中国</dt>
                <dd>作者:本书编写组</dd>
                <dd>价格:</dd>
            </dl></li>
        <li><span></span>完全图解狗的心理</li>
        <li><span></span>左手婚姻,右手爱情</li>
        <li><span></span>假如给我三天光明(电子书)</li>
    </ul>
</div>
</body>
</html>

js实现手风琴效果3:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>list</title>
    <style>
        *{ margin: 0;padding: 0;font-size: 15px; }
        .list{width: 400px; height: 180px;border: 1px solid #000;}
        .title{height: 30px; background: rgba(204, 202, 204, 0.56); padding-left: 10px; line-height: 30px;}
        ul li{list-style: none;padding-left: 10px;border-bottom: 1px dotted #000000;line-height: 30px;color: darkslateblue; }
        span{width: 25px;height: 25px;background-color: red;display: inline-block;text-align: center; line-height: 25px;}
        ul li dl {padding-left: 37px;display: none; }
    </style>
<script type="text/javascript">
        function showdetail() {
            document.getElementById('detail').style.display = 'block';
        }
        function hidedatail() {
            document.getElementById('detail').style.display = 'none';
        }
    </script>
</head>
<body>
<div class="list">
    <h3 class="title">阅读排行</h3>
    <ul>
        <li onmouseover="showdetail()" onmouseout="hidedatail()">
            <span></span>舌尖上的中国:传世美味完全攻略
            <dl id="detail">
                <dt>舌尖上的中国</dt>
                <dd>作者:本书编写组</dd>
                <dd>价格:</dd>
            </dl></li>
        <li><span></span>完全图解狗的心理</li>
        <li><span></span>左手婚姻,右手爱情</li>
        <li><span></span>假如给我三天光明(电子书)</li>
    </ul>
</div>
</body>
</html>

js实现手风琴效果4:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>list</title>
    <style>
        *{ margin: 0;padding: 0;font-size: 15px; }
        .list{width: 400px; height: 180px;border: 1px solid #000;}
        .title{height: 30px; background: rgba(204, 202, 204, 0.56); padding-left: 10px; line-height: 30px;}
        ul li{list-style: none;padding-left: 10px;border-bottom: 1px dotted #000000;line-height: 30px;color: darkslateblue; }
        span{width: 25px;height: 25px;background-color: red;display: inline-block;text-align: center; line-height: 25px;}
        ul li dl {padding-left: 37px;display: none; }
    </style>
 <script type="text/javascript">
        function showdetail(d) {
            document.getElementById(d).style.display = 'block';
        }
        function hidedetail(d) {
            document.getElementById(d).style.display = 'none';
        }
    </script>
</head>
<body>
<div class="list">
    <h3 class="title">阅读排行</h3>
    <ul>
        <li onmouseover="showdetail('detail')" onmouseout="hidedetail('detail')">
            <span></span>舌尖上的中国:传世美味完全攻略
            <dl id="detail">
                <dt>舌尖上的中国</dt>
                <dd>作者:本书编写组</dd>
                <dd>价格:</dd>
            </dl></li>
        <li><span></span>完全图解狗的心理</li>
        <li><span></span>左手婚姻,右手爱情</li>
        <li><span></span>假如给我三天光明(电子书)</li>
    </ul>
</div>
</body>
</html>

js实现手风琴效果5:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>list</title>
    <style>
        *{ margin: 0;padding: 0;font-size: 15px; }
        .list{width: 400px; height: 180px;border: 1px solid #000;}
        .title{height: 30px; background: rgba(204, 202, 204, 0.56); padding-left: 10px; line-height: 30px;}
        ul li{list-style: none;padding-left: 10px;border-bottom: 1px dotted #000000;line-height: 30px;color: darkslateblue; }
        span{width: 25px;height: 25px;background-color: red;display: inline-block;text-align: center; line-height: 25px;}
        ul li dl {padding-left: 37px;display: none; }
    </style>
</head>
 <script type="text/javascript">
        function showdetail(obj) {
            obj.getElementsByTagName('dl')[0].style.display = 'block';
        }
        function hidedetail(obj) {
            obj.getElementsByTagName('dl')[0].style.display = 'none';

        }
<body>
<div class="list">
    <h3 class="title">阅读排行</h3>
    <ul>
        <li onmouseover="showdetail(this)" onmouseout="hidedetail(this)">
            <span></span>舌尖上的中国:传世美味完全攻略
            <dl>
                <dt>舌尖上的中国</dt>
                <dd>作者:本书编写组</dd>
                <dd>价格:</dd>
            </dl>
            <dl>
                <dt>舌尖上的中国ren</dt>
                <dd>作者:本书编写组</dd>
                <dd>价格:</dd>
            </dl></li>
        <li onmouseover="showdetail(this)" onmouseout="hidedetail(this)"><span></span>完全图解狗的心理
            <dl>
                <dt>舌尖上的中国舌尖中国</dt>
                <dd>作者:本书编写组</dd>
                <dd>价格:</dd>
            </dl></li>
        <li><span></span>左手婚姻,右手爱情</li>
        <li><span></span>假如给我三天光明(电子书)</li>
    </ul>
</div>
</body>
</html>

jquery实现手风琴效果:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>list</title>
    <style>
        *{ margin: 0;padding: 0;font-size: 15px; }
        .list{width: 400px; height: 180px;border: 1px solid #000;}
        .title{height: 30px; background: rgba(204, 202, 204, 0.56); padding-left: 10px; line-height: 30px;}
        ul li{list-style: none;padding-left: 10px;border-bottom: 1px dotted #000000;line-height: 30px;color: darkslateblue; }
        span{width: 25px;height: 25px;background-color: red;display: inline-block;text-align: center; line-height: 25px;}
        ul li dl {padding-left: 37px;display: none; }
    </style>
 <script class="lazyload" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC" data-original="jquery-3.1.1.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#li').mouseover(function () {
                $('#detail').css('display','block');
            })
            $('#li').mouseout(function () {
                $('#detail').css('display','none');
            })
        })
    </script>
</head>

<body>
<div class="list">
    <h3 class="title">阅读排行</h3>
    <ul>
        <li id="li">
            <span></span>舌尖上的中国:传世美味完全攻略
            <dl id="detail">
                <dt>舌尖上的中国</dt>
                <dd>作者:本书编写组</dd>
                <dd>价格:</dd>
            </dl></li>
        <li><span></span>完全图解狗的心理</li>
        <li><span></span>左手婚姻,右手爱情</li>
        <li><span></span>假如给我三天光明(电子书)</li>
    </ul>
</div>
</body>
</html>

jquery实现手风琴效果7:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>list</title>
    <style>
        *{ margin: 0;padding: 0;font-size: 15px; }
        .list{width: 400px; height: 180px;border: 1px solid #000;}
        .title{height: 30px; background: rgba(204, 202, 204, 0.56); padding-left: 10px; line-height: 30px;}
        ul li{list-style: none;padding-left: 10px;border-bottom: 1px dotted #000000;line-height: 30px;color: darkslateblue; }
        span{width: 25px;height: 25px;background-color: red;display: inline-block;text-align: center; line-height: 25px;}
        ul li dl {padding-left: 37px;display: none; }
    </style>
 <script class="lazyload" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC" data-original="jquery-3.1.1.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('li').mouseover(function () {
                $(this).children('dl').css('display','block');
                $(this).children('span').addClass('on');
            })
            $('li').mouseout(function () {
                $(this).children('dl').css('display','none');
                $(this).children('span').removeClass('on');
            })
        })
    </script>
</head>
<body>
<div class="list">
    <h3 class="title">阅读排行</h3>
    <ul>
        <li id="li">
            <span></span>舌尖上的中国:传世美味完全攻略
            <dl id="detail">
                <dt>舌尖上的中国</dt>
                <dd>作者:本书编写组</dd>
                <dd>价格:</dd>
            </dl></li>
        <li><span></span>完全图解狗的心理</li>
        <li><span></span>左手婚姻,右手爱情</li>
        <li><span></span>假如给我三天光明(电子书)</li>
    </ul>
</div>
</body>
</html>
點(diǎn)擊查看更多內(nèi)容
4人點(diǎn)贊

若覺得本文不錯,就分享一下吧!

評論

作者其他優(yōu)質(zhì)文章

正在加載中
感謝您的支持,我會繼續(xù)努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進(jìn)行掃碼打賞哦
今天注冊有機(jī)會得

100積分直接送

付費(fèi)專欄免費(fèi)學(xué)

大額優(yōu)惠券免費(fèi)領(lǐng)

立即參與 放棄機(jī)會
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號

舉報(bào)

0/150
提交
取消