CSS/HTML CSS3 Add Text Showdows And Blur Showdows Code For Website - Learn About Website | DaddyFile

0

CSS3 Shadow Effects Explain

With CSS3 you can add shadow to text and to elements.

Html Code:

<!DOCTYPE html>
<html>
<head>
<style>
h1 {
    text-shadow: 2px 2px;
}
</style>
</head>
<body>

<h1>Text-shadow effect!</h1>

<p><b>Note:</b> Internet Explorer 9 and earlier versions, do not support the text-shadow property.</p>

</body>

</html>







Html Code Result:

Text-shadow effect!

Note: Internet Explorer 9 and earlier versions, do not support the text-shadow property.








add a blur effect to the shadow:

Html Code:

<!DOCTYPE html>
<html>
<head>
<style>
h1 {
    text-shadow: 2px 2px 5px red;
}
</style>
</head>
<body>

<h1>Text-shadow effect!</h1>

<p><b>Note:</b> Internet Explorer 9 and earlier versions, do not support the text-shadow property.</p>

</body>
</html>







Html Code Result:

Text-shadow effect!

Internet Explorer 9 and earlier versions, do not support the text-shadow property.








add a color to the shadow:

Html Code:

<!DOCTYPE html>
<html>
<head>
<style>
h1 {
    text-shadow: 2px 2px red;
}
</style>
</head>
<body>

<h1>Text-shadow effect!</h1>

<p><b>Note:</b> Internet Explorer 9 and earlier versions, do not support the text-shadow property.</p>

</body>
</html>







Html Code Result:

Text-shadow effect!

Internet Explorer 9 and earlier versions, do not support the text-shadow property.








white text with black shadow:

Html Code:

<!DOCTYPE html>
<html>
<head>
<style>
h1 {
    color: white;
    text-shadow: 2px 2px 4px #000000;
}
</style>
</head>
<body>

<h1>Text-shadow effect!</h1>

<p><b>Note:</b> Internet Explorer 9 and earlier versions, do not support the text-shadow property.</p>

</body>
</html>








Html Code Result:

Text-shadow effect!

Internet Explorer 9 and earlier versions, do not support the text-shadow property.





white text with black, blue, and darkblue shadow:

Html Code:

<!DOCTYPE html>
<html>
<head>
<style>
h1 {
    color: white;
    text-shadow: 1px 1px 2px black, 0 0 25px blue, 0 0 5px darkblue;
}
</style>
</head>
<body>

<h1>Text-shadow effect!</h1>

<p><b>Note:</b> Internet Explorer 9 and earlier versions, do not support the text-shadow property.</p>

</body>
</html>







Html Code Result:

Text-shadow effect!

Internet Explorer 9 and earlier versions, do not support the text-shadow property.

Post a Comment

 
Top