- Mastering CSS
- Rich Finelli
- 215字
- 2021-07-08 09:46:01
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:

- ASP.NET Core 5.0開發(fā)入門與實(shí)戰(zhàn)
- HBase從入門到實(shí)戰(zhàn)
- 趣學(xué)Python算法100例
- Blender 3D Incredible Machines
- FLL+WRO樂高機(jī)器人競賽教程:機(jī)械、巡線與PID
- Learn React with TypeScript 3
- Learning OpenStack Networking(Neutron)
- C++從入門到精通(第5版)
- Node學(xué)習(xí)指南(第2版)
- Android Studio開發(fā)實(shí)戰(zhàn):從零基礎(chǔ)到App上線 (移動開發(fā)叢書)
- 數(shù)據(jù)科學(xué)中的實(shí)用統(tǒng)計學(xué)(第2版)
- Software-Defined Networking with OpenFlow(Second Edition)
- jQuery Mobile Web Development Essentials(Second Edition)
- 體驗(yàn)之道:從需求到實(shí)踐的用戶體驗(yàn)實(shí)戰(zhàn)
- Web開發(fā)新體驗(yàn)