How to apply glow to a div?

-5

If you set this text it has a glow, how can I apply that same glow in css ? to a div?

Without shadow box

For example, classic css methods, which are box-shadow and text-shadow , are always applied to a div or text, but how would you do without this ?, I can not clearly give an example because I can not find another method, in any case the corrections are appreciated .

    
asked by Eduardo Sebastian 12.09.2017 в 04:30
source

1 answer

1
h1 {
    text-shadow: 2px 4px 8px blue;
}

The shadow will be displaced to the right 2px, separated down 4px and with a blur (if we can call it that) of 8px.

So that something similar to the image you have put and the shadow comes out from the center you have to have the offset to 0px 0px

Play with the measures of the px and with the color to adapt it to your liking.

  

Note: Not supported in Internet Explorer 9 or earlier versions.

body {
    background-color: black;
    color: white;
}

h1 {
  text-shadow: 0px 0px 10px yellow;
}
<h1>Esto es un título</h1>
    
answered by 12.09.2017 в 12:45