首页 > 其他 > 详细

伪元素 字体图标

时间:2020-05-21 20:31:32      阅读:50      评论:0      收藏:0      [点我收藏+]
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        @font-face {
            font-family: ‘icomoon‘;
            src: url(‘fonts/icomoon.eot?cv013x‘);
            src: url(‘fonts/icomoon.eot?cv013x#iefix‘) format(‘embedded-opentype‘), url(‘fonts/icomoon.ttf?cv013x‘) format(‘truetype‘), url(‘fonts/icomoon.woff?cv013x‘) format(‘woff‘), url(‘fonts/icomoon.svg?cv013x#icomoon‘) format(‘svg‘);
            font-weight: normal;
            font-style: normal;
        }
        
        span {
            font-family: ‘icomoon‘;
            position: absolute;
            top: 10px;
            right: 10px;
        }
        
        div,
        p {
            position: relative;
            width: 249px;
            height: 35px;
            border: 1px solid red;
        }
        /* p::after {
            content: "?";
            font-family: ‘icomoon‘;
            position: absolute;
            top: 10px;
            right: 10px;
        } */
        
        p::after {
            content: "\ea50";
            font-family: ‘icomoon‘;
            position: absolute;
            top: 10px;
            right: 10px;
        }
    </style>
</head>

<body>
    <div>
        <span>?</span>
    </div>

    <p></p>

</body>

</html>

伪元素 字体图标

原文:https://www.cnblogs.com/ericblog1992/p/12933294.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!