คุณสมบัติ text-shadow
คุณสมบัติ text-shadow ใช้กำหนดเงารอบข้อความ ลองรันโค้ดต่อไปนี้เพื่อกำหนดคุณสมบัติ text-shadow:
ตัวอย่าง
<html>
<head>
</head>
<body>
<p style="text-shadow:3px 2px 5px red;">
If your browser supports the CSS text-shadow property, this text will have a red shadow. </p>
</body>
</html>
รูปแบบค่า:
text-shadow: h-offset v-offset blur-radius color;
- h-offset - ระยะแนวนอน (บวก = ขวา, ลบ = ซ้าย)
- v-offset - ระยะแนวตั้ง (บวก = ล่าง, ลบ = บน)
- blur-radius - รัศมีการเบลอ (optional)
- color - สีของเงา (optional)
สามารถกำหนดเงาหลายชั้นได้ คั่นด้วยจุลภาค