国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > CSS > 正文

div+css樣式自制帶小三角的tooltips效果

2024-07-11 08:58:41
字體:
來源:轉載
供稿:網友

 代碼和效果圖如下:

<!DOCTYPE html><html>    <head>        <meta charset="utf-8" />        <title></title>        <style type="text/css">            .tooltips {                position: relative;                width: 300px;                height: 80px;                line-height: 60px;                background: #D7E7FC;                border-radius: 4px;            }            .arrow {                position: absolute;                color: #D7E7FC;                width: 0px;                height: 0px;                line-height: 0px;                border-width: 20px 15px 0;                border-style: solid dashed dashed dashed;                border-left-color: transparent;                border-right-color: transparent;                bottom: -20px;                right: 50%;            }            .tooltips {                position: relative;                width: 300px;                height: 80px;                line-height: 60px;                background: #D7E7FC;                border: 1px solid #A5C4EC;                border-radius: 4px;            }            .arrow {                position: absolute;                width: 0px;                height: 0px;                line-height: 0px;                border-width: 20px 15px 0;                border-style: solid dashed dashed dashed;                border-left-color: transparent;                border-right-color: transparent;            }            .arrow-border {                color: #A5C4EC;                bottom: -20px;                right: 50%;            }            .arrow-bg {                color: #D7E7FC;                bottom: -19px;                right: 50%;            }        </style>    </head>    <body>        <!--先定義一個相對定位的盒子div:-->        <div class="tooltips">            <!--給div盒子添加一個三角型圖標-->            <div class="arrow "></div>            <!--給“小三角穿上松緊帶”需要使用兩個三角形疊加的方式-->            <!--首先我們定義兩個三角形的div,一個背景色和盒子的邊框顏色相同,一個背景色和盒子的背景色一致:-->            <div class="arrow arrow-border"></div>            <div class="arrow arrow-bg"></div>            <!--注意:.arrow-bg和.arrow-border的bottom位置相差為1px(可根據邊框寬度調整)兩個div的順序不可顛倒。-->        </div>    </body></html>

效果展示圖

這里寫圖片描述

總結

以上所述是小編給大家介紹的 div+css樣式自制帶小三角的tooltips效果,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對武林網網站的支持!

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 夏津县| 巴彦县| 阿图什市| 郎溪县| 德化县| 伊金霍洛旗| 邯郸县| 青冈县| 监利县| 连云港市| 莱阳市| 承德市| 朝阳区| 三穗县| 阳东县| 老河口市| 桐庐县| 额尔古纳市| 巴彦淖尔市| 安西县| 永清县| 鄂托克旗| 应城市| 雷山县| 赤峰市| 扎鲁特旗| 永德县| 镇坪县| 安龙县| 内丘县| 柳江县| 义乌市| 南木林县| 鸡泽县| 西华县| 道孚县| 林周县| 定陶县| 广德县| 科尔| 大英县|