CSS (Cascading Style Sheets) has evolved into a powerful tool, allowing you to develop more efficient and better-looking sites. Many of the new features in the latest CSS revision (CSS3) are rich and take the quality of our designs to the next level. In this tutorial, we will show you some basic CSS3 Techniques that you should know.
1, Multiple Backgrounds
CSS3 lets you apply multiple backgrounds to an element using several properties. Included in this list of properties is background-image, background-repeat, background-position and background-size. In order to include these multiple backgrounds within a single element, you must specify the correct properties separated by commas.
url(../images/bottom-left.png) top right fixed no-repeat,
url(../images/bottom-right.png) top left fixed no-repeat,
url(../images/top-left.png) bottom left fixed no-repeat,
url(../images/top-right.png) bottom right fixed no-repeat;
2, Resizing Elements:
With CSS3, you can now resize your elements using the resize property. Nice right? The catch: it only works in Safari right now. The following code block makes it possible to have a tiny triangle appear in the bottom right corner of an element that you can then drag to resize.
3, Text Shadows:
The text-shadow property allows you to add a dropshadow underneath HTML text elements. You should always make sure your text is readable in case the user’s browser doesn’t support advanced CSS3 properties.
In the following example, we apply a dark blue (#003471) text-shadow that’s 2px to the right and 5px to the bottom of the text and with a blur of radius of 2px, to all h1 elements.
text-shadow: #003471 2px 5px 2px;
4, Rounded Corners:
Creating rounded corners can be a bit of a task. However, with CSS3, it can be a breeze when using a new property called border-radius. This property sets the curvature for every corner of the box.
For example, the below code will produce 10px-rounded corners for divs:
border: 2px solid #434343;
- Fixed Menu When Scrolling & Fixed Navigation Menu Bar
- Responsive Tables Bootstrap Examples
- Dropdown Menu using Jquery and CSS
Other Posts you may be interested in:
- Transfer domain .xyz về dreamhost chỉ $1.95
- Những trang rút gọn link miễn phí tốt nhất
- Cách ẩn các thông báo lỗi (Warnings and Notices) trên WordPress
- How to Hide a User Account from the Welcome Screen in Windows 10
- Lịch thi đấu, bảng xếp hạng C1/Champion League 2015-2016
- Cách dùng và công dụng của mật ong
- Lễ vu lan báo hiếu 2020 là ngày nào?
Last updated on March 27th, 2018 at 10:17 pm