The difference between # and . in css_html/css_WEB-ITnose
The difference between # and . in css
2009-03-04 14:43 fyws Category: Html/Css | Viewed 1911 times
css的#和.的区别如:#home #h3 { padding-top:0; padding-bottom:0; }.pop #h2, .pop #h3 { position:static; background:none; border-width:0; width:auto; }其中#和.的区别是什么
Share to:
2009-03-04 14:58
# Heroes vying for hegemony, the team needs you ! #
Asked by
用 # 定义的css 要用 id="home" 来引用用 . 定义的css 要用 class="pop" 来引用像下面#home #h3 表示 id为 home的网页元素 里面的 id为 h3的元素引用 {padding-top:0;padding-bottom:0; }样式<div id="home"> <div id="h3"> 这个div用 #home #h3 样式</div></div><div class="pop> <div id="h2"> 这个div用 .pop #h2 样式</div></div><div class="pop> <div id="h3"> 这个div用 .pop #h3 样式</div></div>.pop #h2 和 .pop #h3 是一样的

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

The article discusses the <iframe> tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

GiteePages static website deployment failed: 404 error troubleshooting and resolution when using Gitee...
