- Mastering CSS
- Rich Finelli
- 152字
- 2021-07-08 09:45:46
Embedded style sheets
Instead of using the best type of style sheet, the external style sheet, we can also write our rule sets in the head of HTML documents. This is called an embedded style sheet. There are plenty of reasons for not doing it this way. The main two reasons are that it hampers the workflow, and it only controls a single page of the site. What we would do is simply create somewhere in the head tag, these open and close <style> tags:
<head>
<style> </style>
</head>
Anywhere inside this open <style> tag we can start adding our rule sets, which will only affect this one page:
<head>
<style> h2 { font-size: 50px;
} </style>
</head>
Again, this isn't the most preferred place to write your styles. Keeping them in an external style sheet will, 99 percent of the time, be the best place, but you do have the option of embedding styles in the head tag of your document.
- Django+Vue.js商城項目實戰(zhàn)
- WSO2 Developer’s Guide
- Visual Basic程序設(shè)計習(xí)題解答與上機指導(dǎo)
- Drupal 8 Configuration Management
- Java網(wǎng)絡(luò)編程核心技術(shù)詳解(視頻微課版)
- Spring Security Essentials
- Serverless Web Applications with React and Firebase
- Everyday Data Structures
- 玩轉(zhuǎn).NET Micro Framework移植:基于STM32F10x處理器
- 基于GPU加速的計算機視覺編程:使用OpenCV和CUDA實時處理復(fù)雜圖像數(shù)據(jù)
- Python Machine Learning Cookbook
- Android高級開發(fā)實戰(zhàn):UI、NDK與安全
- Elastix Unified Communications Server Cookbook
- ASP.NET本質(zhì)論
- Python自動化運維:技術(shù)與最佳實踐