Home > CSS, HTML, Pemrograman > Membuat Bayangan Teks (Text Shadow) dengan CSS3

Membuat Bayangan Teks (Text Shadow) dengan CSS3


Pada contoh ini saya menggunakan eksternal css. Berikut hasil tampilannya  :

text_shadow_with_css3

Text Shadow with CSS3

Langkah pertama kita buat file html-nya terlebih dahulu seperti contoh dibawah :

text.html

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt;
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Latihan</title>
</head>
<link href=”style.css” rel=”stylesheet” type=”text/css” />
<body >
<div>Text Example</div>
</body>
</html>

Selanjutnya kita buat script CSS-nya :

style.css

@charset "utf-8";

/* CSS Document */

.shadow {

text-shadow: 3px 3px 3px #999;

font-weight: bold;

font-size: 36px;

color: #333;

}

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: