After overflow hidden is changed to visible, it will block the following tags_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:40:13
Original
1521 people have browsed it



The code is as follows:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html>    <head>        <meta http-equiv="Content-Type" content="text/html; charset=GBK">        <title>Untitled Document</title>        <style type="text/css">                        a:link, a:visited {                text-decoration: none;				            }                        dt, dd {                margin: 0px;				padding-top:10px;            }                        dl {                height: 27px;								            }            .open {                overflow: visible;            }                        .close {                overflow: hidden;            }        </style>    </head>    <body>        <script type="text/javascript">                  </script>        <dl class="close">            <dt onclick="listMethod(this)">                <a href="javascript:void(0)">显示条目一</a>            </dt>            <dd>显示内容1</dd>            <dd>显示内容2</dd>            <dd>显示内容3</dd>            <dd>显示内容4</dd>         </dl>            <dl class="close">            <dt onclick="listMethod(this)">                <a href="javascript:void(0)">显示条目二</a>            </dt>            <dd>显示条目二内容1</dd>            <dd>显示条目二内容2</dd>            <dd>显示条目二内容3</dd>            <dd>显示条目二内容4</dd>         </dl>            <dl class="close">            <dt onclick="listMethod(this)">                <a href="javascript:void(0)">显示条目三</a>            </dt>            <dd>显示内容1</dd>            <dd>显示内容2</dd>            <dd>显示内容3</dd>            <dd>显示内容4</dd>         </dl>            <script type="text/javascript">            var flag = true;                      function listMethod2(){                            var dlNode = document.getElementById("dlID");//                if (dlNode.style.overflow == visible) {//                    dlNode.style.overflow = "hidden";//                }//                else //                    if (dlNode.style.overflow == hidden) {//                        dlNode.style.overflow = "visible"//                    }                                if (flag) {                    dlNode.style.overflow = "visible";                    flag = false;                }                else {                    dlNode.style.overflow = "hidden";                    flag = true;                }            }                        function listMethod(node){                //var dlNode = document.getElementById("dlID");                //alert(node.nodeName);								var dlNode = node.parentNode;								                if (dlNode.className == "open") {                    dlNode.className = "close";                }                else {                    dlNode.className = "open";                }            }        </script>    </body></html>
Copy after login


Reply to discussion (solution)

            .open {                overflow: visible;                height: auto;            }
Copy after login
Copy after login

            .open {                overflow: visible;                height: auto;            }
Copy after login
Copy after login


Thank you!
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template