码迷,mamicode.com
首页 > 其他好文 > 详细

arrowTip 提示

时间:2015-06-09 16:44:19      阅读:77      评论:0      收藏:0      [点我收藏+]

标签:

<!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">
        body
        {
        }

        div
        {
            background-color: #fff;
            position: relative;
        }

        .text
        {
            width: 50%;
            height: 100px;
            margin: 10px;
            border-radius: 5px;
            border: 1px solid #f00;
            background-color: #ccc;
        }

        .arrowTip
        {
            border: 5px solid #ccc;
            border-color: transparent transparent #ccc transparent;
            width: 0px;
            line-height: 0px;
            height: 0px;
            position: absolute;
            display: block;
        }

        .top
        {
            left: 40px;
            top: -10px;
            border-color: transparent transparent #ccc transparent;
        }

        .left
        {
            border-color: transparent #ccc transparent transparent;
            left: 0px;
            top: 30px;
        }

        .right
        {
            border-color: transparent transparent transparent #ccc;
            left: 50%;
            top: 30px;
            margin-left: 12px;
        }

        .bottom
        {
            border-color: #ccc transparent transparent transparent;
            left: 50px;
            bottom: -10px;
        }

        .clear
        {
            clear: both;
        }
    </style>
</head>
<body>
    <div>
        <span class="arrowTip top"></span>
        <div class="text">top  底端需要一定高度才可以保证滚动条有足够高度让标题5到达指定位置</div>
    </div>
    <div class="clear"></div>
    <div>
        <span class="arrowTip left"></span>
        <div class="text">left  底端需要一定高度才可以保证滚动条有足够高度让标题5到达指定位置</div>
    </div>
    <div class="clear"></div>
    <div>
        <span class="arrowTip right"></span>
        <div class="text">right  底端需要一定高度才可以保证滚动条有足够高度让标题5到达指定位置</div>
    </div>
    <div>
        <span class="arrowTip bottom"></span>
        <div class="text">bottom  底端需要一定高度才可以保证滚动条有足够高度让标题5到达指定位置</div>
    </div>
</body>
</html>

 

arrowTip 提示

标签:

原文地址:http://www.cnblogs.com/brucehome/p/4563744.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!