PNLdev
Tutorial
Front-end
HTML
reference
CSS
reference
JavaScript
reference
En
English
فارسی
En
English
فارسی
Tutorial
Front-end
HTML
reference
CSS
reference
JavaScript
reference
Run
<!DOCTYPE html> <html> <head> <style> #example1 { border: 5px solid; padding: 15px; box-shadow: 5px 10px; } #example2 { border: 5px solid; padding: 15px; box-shadow: 5px 10px #88c999; } #example3 { border: 5px solid; padding: 15px; box-shadow: 5px 10px green; } </style> </head> <body> <h1>box-shadow property example</h1> <p>The box-shadow property defines the shadow of an element:</p> <h2>box-shadow: 5px 15px:</h2> <div id="example1"> <p>A div element with a shadow. The first value is the horizontal offset and the second value is the vertical offset. The shadow color will be inherited from the text color.</p> </div> <h2>box-shadow: 5px 10px #88c999:</h2> <div id="example2"> <p>You can also define the color of the shadow. Here the shadow color is grey.</p> </div> <h2>box-shadow: 5px 10px green:</h2> <div id="example3"> <p>A green shadow.</p> </div> </body> </html>