官术网_书友最值得收藏!

Multiple classes

To recap, so far you've learned how to create a class that can be reused anywhere on our web page in order to create a button. However, buttons tend to vary across a website. You may have, for instance, buttons like: Okay, Close, Cancel, Submit, and Add to cart. All of which have different meanings so are all colored or styled slightly differently. In some scenarios, as in the case of our movies and index pages, the buttons just end up varying based on the page that they're on because of the layout differences between the pages. In this section, we'll get even more modular and learn how to use multiple classes in order to change the appearance of our buttons. We'll look at a few examples of how multiple classes can provide us some affordances in regard to styling our buttons throughout the site.

The following screenshot illustrates the final site. We're shooting for buttons that look like the Learn More button. They're floated to the right, they're white, they have a white border, and their width is narrower:

The following is where we stand with regard to our site at the moment. Our buttons are dark gray in color and have full width, they're just not what we're looking for here:

主站蜘蛛池模板: 丰宁| 焦作市| 灵山县| 淮北市| 兖州市| 万荣县| 潼南县| 西乌珠穆沁旗| 读书| 文登市| 泽普县| 洪泽县| 宁安市| 柘荣县| 嘉鱼县| 威信县| 新源县| 兰西县| 长宁区| 靖江市| 大同市| 平利县| 丘北县| 枞阳县| 安国市| 克东县| 滦平县| 苗栗县| 阿鲁科尔沁旗| 庆元县| 云林县| 方城县| 洮南市| 酉阳| 浠水县| 左权县| 石渠县| 黎川县| 板桥市| 龙口市| 三台县|