google+javascriptbanktwitter@js_bankfacebook@jsbankrss@jsbank






Cơ bản về thuộc tính box-shadow của CSS3 Một bài hướng dẫn CSS3 cơ bản với nhiều ví dụ mẫu CSS33 trực tiếp để giúp bạn hiểu rõ hơn về thuộc tính box-shadow.


Nhãn: thuộc tính box-shadow, cơ bản CSS3, ví dụ mẫu CSS3, hướng dẫn CSS3

Miễn phí web hosting 1 năm đầu tại iPage



Nếu bạn vẫn còn đang tìm kiếm một nhà cung cấp hosting đáng tin cậy, tại sao không dành chút thời gian để thử với iPage, chỉ với không quá 40.000 VNĐ/tháng, nhưng bạn sẽ được khuyến mãi kèm với quà tặng trị giá trên 10.000.0000 VNĐ nếu thanh toán cho 24 tháng ~ 900.000 VNĐ?

Có trên 1 triệu khách hàng hiện tại của iPage đã & đang hài lòng với dịch vụ, tuyệt đối chắc chắn bạn cũng sẽ hài lòng giống họ! Quan trọng hơn, khi đăng ký sử dụng web hosting tại iPage thông qua sự giới thiệu của chúng tôi, bạn sẽ được hoàn trả lại toàn bộ số tiền bạn đã sử dụng để mua web hosting tại iPage. Wow, thật tuyệt vời! Bạn không phải tốn bất kì chi phí nào mà vẫn có thể sử dụng miễn phí web hosting chất lượng cao tại iPage trong 12 tháng đầu tiên. Chỉ cần nói chúng tôi biết tài khoản của bạn sau khi đăng ký.

Nếu muốn tìm hiểu thêm về ưu / nhược điểm của iPage, bạn hãy đọc đánh giá của ChọnHostViệt.com nhé!
Thử iPage miễn phí cho năm đầu tiên NGAY

---

Standard Shadow

.standard-shadow { box-shadow: 1px 1px 1px rgba(0,0,0,0.5); }

The above code would generate a shadow like this:

You have your first 2 values which give the horizontal and vertical offsets of the shadow, a third value which sets the amount of blur you want to apply and lastly a color (in which case we use an rgba() value for a half opacity black). Box-shadow is supported on every modern browser, but if you are so incredibly inclined, a -webkit and -moz prefix would come in handy for full support of those older browsers. Now, you may think "Oh, well that's nice. Now I can make a shadow, woohoo" but things aren't over just yet!

Glow

.glow-shadow { box-shadow: 0 0 5px 1px #09F; }

Look at that! We adjust the offset so that the "shadow" is basically centered on the element. We expanded the blur radius to 5px, added a new value to 1 px, that value being "spread". This gives a sort of extra "thickness" to the shadow.

Another Border

.border-shadow { box-shadow: 0 0 0 2px #F00; }

Keeping the 0 x and y offset, but lowering the blur to 0 will basically use the spread value as the thickness for an extra border! This can come in handy when an input has the wrong info, or you want to add a border to an element without affecting it's size and position (shadows, unlike borders, don't shift or add to an element's width).

Multiple Shadow

.multi-shadow { box-shadow: 0 0 5px 1px #09F, 0 0 0 2px #F00; }

Interestingly enough, one of the neat features of box-shadow is the ability to stack them! By separating each set of values with a comma, you can add multiple shadows to a single element. This technique has been used to make some crazy things.

Inset Shadow

.inset-shadow { box-shadow: inset 1px 1px 4px #000; }

Last, but not least, by adding an "inset" value before all our other values, we can have the shadow radiate from the inside (a la Photoshop's inner shadow/glow) instead of out. This effect comes in handy for a pressed button or to add an inner glow to an element.

And those are the basics of the box-shadow! There's still more you can do too; here are a few more fancy tricks you can do! In particular, there are extra examples of what that optional "spread" value can do.

iPhoneKer.com
Save up to 630$ when buy new iPhone 15

GateIO.gomymobi.com
Free Airdrops to Claim, Share Up to $150,000 per Project

https://tooly.win
Open tool hub for free to use by any one for every one with hundreds of tools

chatGPTaz.com, chatGPT4.win, chatGPT2.fun, re-chatGPT.com
Talk to ChatGPT by your mother language

Dall-E-OpenAI.com
Generate creative images automatically with AI

AIVideo-App.com
Render creative video automatically with AI

JavaScript theo ngày


Google Safe Browsing McAfee SiteAdvisor Norton SafeWeb Dr.Web