본문 바로가기
퍼블리싱

[CSS] 글씨에 테두리 적용

by 오엥?은 2025. 5. 2.
반응형

📌 글씨에 테두리 적용

◽ text-stroke

<body>
    <h1 class="heading">Hello</h1>
</body>

html 이렇게 작성해주고

 

body {
    font-weight: 300;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #205f1042;
}

.heading {
    margin: 0;
    font-size: 5em;

    /* -webkit-text-stroke-width: 2px;
    -webkit-text-stroke-color: #fff; */

    -webkit-text-stroke: 2px #fff;
    
    color: transparent;
}

css 이렇게 작성해주면

반응형

글씨에 테두리 적용

 

 

반응형