125강. ::before, ::after 적용

2019. 2. 13. 23:28Front End 강의내용

<!DOCTYPE html>

<html>

<head>

    <meta charset="UTF-8">

    <title>Document</title>

    <style>

        p{

            padding 20px;

            background: tomato;

            color: #fff;

        }

        p::before{

            content: 'before';

            display: block; /* 밑에 칸부터 */

            color: black;

        }

        p::after{

            content: ' after';

        }

    </style>

</head>

<body>

    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Omnis quidem rerum quaerat. Asperiores explicabo, accusantium obcaecati velit ipsum unde, repudiandae, corporis dignissimos ipsam sequi voluptatem esse placeat, provident id atque!</p>

</body>

</html>

'Front End 강의내용' 카테고리의 다른 글

127강. select the text 적용  (0) 2019.02.14
126강. Dropcap 적용  (0) 2019.02.13
124강. ::first-letter, ::first-line, ::selector 적용  (0) 2019.02.13
122강. only-of-type 적용  (0) 2019.02.12
121강. nth-child 적용  (0) 2019.02.12