Home  >  Q&A  >  body text

How to get this kind of stroke and shadow using CSS

I tried stroke but didn't get the result, so please suggest me the CSS to solve this problem. I also tried shadow to text:

body {
  color: #000;
  -webkit-text-fill-color: #030303;
  -webkit-text-stroke-width: 0px;
  -webkit-text-stroke-color: #fbf7f7;
  text-shadow: 8px -2px 0 #fff4f4,
  -4px -6px 0 #fff,
  -6px -5px 0 #fff,
  -8px 5px 0 #fffbfb;
}

/* added by Editor for demonstration purpose */
body {
  background-color: lightgray;
}
Lorem Ipsum

P粉218775965P粉218775965372 days ago428

reply all(1)I'll reply

  • P粉232793765

    P粉2327937652023-09-12 11:22:51

    You can use text stroke :

    body{
      background:gray;
    }
    p{
      font-size:38px;
      font-weight:700;
      -webkit-text-stroke: 2px white;
    } 
    <p>Text with shadow</p>

    reply
    0
  • Cancelreply