CSS [attribute="value"] 選擇器的角色
使用 [attribute=”value”] 選擇器來選擇具有指定屬性和值的元素。
你可以嘗試執行以下程式碼來實現 CSS [attribute="value"] 選擇器。這裡,我們認為屬性為 rel,
示例
<!DOCTYPE html>
<html>
<head>
<style>
a[rel = nofollow] {
border: 3px solid orange;
}
</style>
</head>
<body>
<a href = "https://qries.com/What-is-Uber-s-business-model-and-how-does-it-compare-with-Ola-s-model-in-India" rel="nofollow">Uber's Business Model</a><br><br>
<a href = "https://www.qries.com/How-does-share-market-work-in-India" rel="noreferrer">Share Market</a>
</body>
</html>
廣告
資料結構
網路
RDBMS
作業系統
Java
iOS
HTML
CSS
Android
Python
C 語言
C++
C#
MongoDB
MySQL
JavaScript
PHP