- Web Developer's Reference Guide
- Joshua Johanan Talha Khan Ricardo Zea
- 221字
- 2021-07-09 20:18:22
Chapter 3. CSS Concepts and Applications
Cascading Style Sheet (CSS) is the preferred way to style HTML. HTML has a style element and a global style attribute. These make it very easy to write unmaintainable HTML. For example, let's imagine that we have 10 elements on an HTML page for which we want the font color to be red. We create a span
element to wrap the text that has the font color red, as follows:
<span style="color: #ff0000;"></span>
Later, if we decide to change the color to blue, we will have to change 10 instances of that element and then multiply this by the number of pages we have used the span
element on. This is completely unmaintainable.
This is where CSS comes in. We can target specific elements/groups of elements to which we wish to apply a specific style. CSS allows us to define these styles, easily update them, and change them from one place to another.
This book will focus on the most used CSS selectors, units, rules, functions, and properties from CSS1, CSS2.1, and CSS3. For the most part, these should all work in any browser, but there are exceptions. A great rule of thumb is that newer browsers will have fewer issues.
We will get started with a quick overview of the different types of basic selectors.
- FuelPHP Application Development Blueprints
- 軟件項目管理(第2版)
- Android和PHP開發(fā)最佳實踐(第2版)
- Instant Nancy Web Development
- PLC應(yīng)用技術(shù)(三菱FX2N系列)
- Hands-On GUI Programming with C++ and Qt5
- 從0到1:HTML5 Canvas動畫開發(fā)
- 零基礎(chǔ)看圖學(xué)ScratchJr:少兒趣味編程(全彩大字版)
- UML軟件建模
- Qt 4開發(fā)實踐
- Java程序設(shè)計教程
- 自己動手構(gòu)建編程語言:如何設(shè)計編譯器、解釋器和DSL
- 產(chǎn)品架構(gòu)評估原理與方法
- Zend Framework 2 Cookbook
- Learning iOS Penetration Testing