tailieunhanh - Web design creating cool web sites with html xhtml and css phần 3

Tôi càng nhìn ở Hình 4-2, tôi nghĩ rằng, "Đó không phải là thực sự hoàn toàn những gì tôi muốn." Đây là nơi mà sức mạnh của CSS làm cho mọi thứ dễ dàng. Để thay đổi phong cách của tất cả các tên nhà sản xuất ngay lập tức, tôi chỉ cần chỉnh sửa định nghĩa phong cách trong khối phong cách. | Chapter 4 Moving into the 21st Century with Cascading Style Sheets The more I look at Figure 4-2 the more I think That s not really quite what I want. Here s where the power of CSS makes things a breeze. To change the style of all the manufacturer names instantly I simply edit the style definition in the style block. A few changes don t worry in a page or so I ll talk about the specific style attributes you can use and suddenly the Web page is totally different Here s my modified code html head title Moving Styles To the Top title style type text css .manuf color blue font-weight bold font-style italic style head body While a variety of companies manufacture digital cameras notably including span class manuf Kodak span span class manuf Olympus span and span class manuf Sony span there are only two companies that offer true digital single lens reflex SLR cameras span class manuf Nikon span and span class manuf Canon span . body html Figure 4-3 shows the result of this code. Remember the only difference between Figure 4-2 and Figure 4-3 is what s specified in the style block. I know that you can t see the result of the color attribute in this black-and-white screen shot but I think you can still see that quite a difference results from such a simple change. Figure 4-3 Same HTML page different style specification. 62 Creating Cool Web Sites with HTM L XHTM L and CSS I hope that simple example is enough to sell you on CSS as a powerful method for formatting and specifying the presentation of your Web pages Sharing a single style sheet The third way that you can work with CSS is to create a completely separate document on your Web server that includes all the styles you want to use. You can then reference that document within all the Web pages on your site. You may think that having a single style definition at the top of your page makes it easy to manage the layout of that page. Imagine how handy it would be to have a site with dozens or hundreds of pages of material .

crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.