HTML——能固定于左侧的弹出框

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yenange/article/details/7350593
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <style type="text/css">
        #divSideContent
        {
            position: fixed;
            top: 150px;
            width: 200px;
            height: 390px;
            margin: 0px;
            padding: 0px;
            background-color: White;
            background-color: #DEF3FF;
            border: 2px solid #C1E8FF;
            border-radius: 0px 10px 10px 0px;
        }
        #divSideBar
        {
            position: fixed;
            top: 230px;
            margin: 0px;
            padding: 0px;
            left: 202px;
            background-color: White;
            cursor: pointer;
            width: 40px;
            height: 150px;
            border: 2px solid #C1E8FF;
            border-radius: 0px 10px 10px 0px;
        }
    </style>
    <script src="jquery/jquery-1.6.4.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        function switchSide() {
            $("#divSideContent").toggle();
            if (parseInt($("#divSideBar").css("left")) == 0) {
                $("#divSideBar").css("left", "202px");
            } else {
                $("#divSideBar").css("left", "0px");
            }
        }
    </script>
</head>
<body style="margin: 0 auto; text-align: center;">
    <input type="hidden" id="sideStatus" value="1" />
    <div id="divSideContent">
    </div>
    <div id="divSideBar" onclick="switchSide()" >
        <br />
        显<br />
        示<br />
        个<br />
        人<br />
        信<br />
        息
    </div>

    <center>
        <div style="width: 800px; height: 1600px; background-color: Red;">
        </div>
    </center>
</body>
</html>


阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页