CSS(1)匯入方式
匯入方式
-
內部樣式
<!-- 內部樣式 -->
<style>
h1{
color: brown;
}
</style> -
外部樣式
<!-- 外部樣式 -->
<!-- 連結式html(推薦) -->
<link rel="stylesheet" href="../匯入方式/style.css">h1{
color: darkorange;
}
<!-- 匯入式css2.1(不推薦) -->
<style>
@import "style.css";
</style> -
行內樣式
<!-- 行內樣式:
在標籤元素中,編寫一個style屬性,編寫樣式即可
不可取,應結構與表現分離
-->
<h1 style="color: #4a78c2">一級標題</h1>
優先順序:就近原則
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>css</title>
<!-- 內部樣式 -->
<style>
h1{
color: brown;
}
</style>
<!-- 外部樣式 -->
<!-- 連結式html(推薦) -->
<link rel="stylesheet" href="../匯入方式/style.css">
<!-- 匯入式css2.1(不推薦) -->
<style>
@import "style.css";
</style>
</head>
<body>
<!-- 優先順序:就近原則 -->
<!-- 行內樣式:
在標籤元素中,編寫一個style屬性,編寫樣式即可
不可取,應結構與表現分離
-->
<h1 style="color: #4a78c2">一級標題</h1>
</body>
</html>
h1{
color: darkorange;
}
相關推薦
CSS(1)匯入方式
匯入方式 內部樣式 <!-- 內部樣式 --> <style>h1{color: brown;} </style> 外部樣式
回顧html+css(1)
技術標籤:前端htmlcsses6 一.html和web網頁組成部分 1.什麼是html 超文字標記語言 2.html的語法
Web優化躬行記(1)——CSS
Web優化的物件包括頁面效能、使用者體驗、開發效率、程式碼優化、網路延遲等,本系列會列舉出眾多常用的優化技巧,每個技巧都可深入分析,在此只做拋磚引玉。
安卓四大元件之服務(1)服務的生命週期和啟動方式
Service是Android四大元件之一,是一個計算型元件。它在Android開發中扮演著一個重要的角色,雖然他不如Activity那麼常見,但是在很多App中都有著實際的應用場景。
.Net Core 快取方式(二)分散式快取 MemoryDistributedCache 實現(1)
.Net Core 快取方式(二)分散式快取 官方文件 官方文件 分散式快取是由多個應用伺服器共享的快取,通常作為外部服務在訪問它的應用伺服器上維護。 分散式快取可以提高 ASP.NET Core 應用程式的效能和可伸縮性,尤
CSS基礎一則(1)
css 美化頁面 書寫型別 行內式: 只作用當前元素,對其他元素無效果 <p style=\"color: red;\">文字內容</p>
CSS之美(1):這個三角形你pink了嗎?
技術標籤:CSScss CSS三角形原理 文章目錄 CSS三角形原理為什麼CSS能畫三角形實現過程
Python拓展——import匯入包之random隨機數和turtle海龜作圖(1)
hello大家好,小蒟蒻我又來啦,布吉島大家第一單元的測試咋樣呢,可以在評論區敲個分數給我哦!
Vuex核心概念-01-State的兩種方式(1)
技術標籤:Vuex Vue核心概念: State State提供唯一的公共資料來源,所有共享的資料都要統一放入Store的State進行儲存。
(1)定義一個抽象類Weapon,該抽象類有兩個抽象方法attack(),move() 這兩個方法分別表示武器的攻擊方式和移動方式。 (2)定義3個類:Tank,Fl
技術標籤:抽象類多型類 程式碼 /*第一題: (1)定義一個抽象類Weapon,該抽象類有兩個抽象方法attack(),move()
《CSS揭祕》第一章(1)
技術標籤:csscss 1、引言 DRY:Don’t Repeat Yourself DRY 的反面:是 WET, 它的意思是 We Enjoy Typing(我們喜歡敲鍵盤) 或 Write Everything Twice(同樣的程式碼寫兩次)。
設計模式(8):JAVA(8):設計模式(1)工廠模式:提供了一種建立物件的最佳方式(1)簡單工廠模式
簡單工廠模式 反例: package com.woniuxy.h_simplefactory.a; /* 工廠模式相關概念: 1. 產品: new 出的物件,都是產品。
資料結構與演算法(1)資料組織方式、空間利用率、演算法的重要性——ZJU
資料結構與演算法(1)資料組織方式、空間利用率、演算法的重要性——ZJU 1.1資料結構基本概念
現代計算機模型-J.U.C併發系列(1)
系列介紹 本系列主要重點介紹Java中的J.U.C併發程式設計,從原理,理論到實踐的過程,帶你一步步瞭解各種知識點,把所有技術點構成一個閉環,形成一個知識體系。
iOS死開發硬轉JAVA後臺 入門到XX(1)
在和組裡的後臺大佬請教了入門 java 後臺的初步學習路線後,我剩餘不多的自由時間變成了 面朝JAVA,頭髮掉光的美(zi)好(nue)生活~
向您圖文並茂生動講解Spring AOP 原始碼(1)
前言 在Spring AOP - 註解方式使用介紹(長文詳解)中,作者介紹了Spring AOP 註解方式的使用方式。算是給咱們的Spring AOP 原始碼分析開了個頭,做了一點知識點的鋪墊。
2019年Java面試題基礎系列228道(1),快看看哪些你還不會?
Java面試題(一) 1、面向物件的特徵有哪些方面? 2、訪問修飾符 public,private,protected,以及不寫(預設)時的區別?
經典演演算法(1):氣泡排序及其優化
(轉載)原文連結:blog.csdn.net/weixin_4357… 氣泡排序 在平常的學習中用到了氣泡排序,這篇部落格對氣泡排序演演算法進行了詳細的程式碼實現,並且進行了兩次優化,供大家一起參考學習。
RabbitMQ學習筆記(1)----訊息佇列
參考網址: 1. https://www.jianshu.com/p/689ce4205021 2. https://zhuanlan.zhihu.com/p/52773169 3. https://juejin.im/post/5cb025fb5188251b0351ef48#heading-2
Flutter開發實戰 高仿微信(1)首頁
初級基礎系列 Flutter開發實戰初級(1)ListView詳解 Flutter開發實戰初級(2)佈局詳解