Div Css(1)_html/css_WEB-ITnose
前天,在CSDN上看到一篇文章《有理想的程序员必须知道的15件事》 原文链接:http://sd.csdn.net/a/20110421/296282.html
看了这篇文章,其中两点印象挺深刻的。
1,多看的同时多练
2,通过学习把理解到的东西通过写博的方式分享出来。(希望大家指出不足之处)
故以后只要有时间我都会通过写博的方式把学到的点滴分享出来。
今天,作为菜鸟的我看了一个讲Div+Css的视频教程。
主要学到了:
1,Css样式的种类。第一:内联式样式表,第二:嵌入式样式表,第三:外部样式表,第四:输入样式表。
什么是内联式样式表?
------这种方式现在已经比较少用了。
什么是嵌入式样式表?
(注意:似乎这个是为了防止有些浏览器不支持Style而用此来代替的)
我是中国人
........(主体内容)
什么是外部样式表?
意思就是:把样式写在一个外部的.Css文件中,然后通过在html页面上引用该文件。任何html页面都可以引用。
引用方法如下:
(注意: href="存放.css文件的地址")
我是中国人
什么是输入样式表?
将Css文件输入到另一个Css文件中。
假如你有一个test1.Css文件
P{
font-size:16px;
color:Red;
background-color:Green;
text-decoration:underline
}
还有一个test2.css文件
div{
color:Yellow;
font-size:20px
}
此时只要在test1.css文件里输入
@import url(test2.css文件的地址) ----此时在页面中只要引用test1.css文件。就相当于引用了在这之前的test1.css和test2.css两个文件
2,学到第二点:样式规则的选择器,第一:html selector;第二:class selector;第三:id selector ;第四:关联选择器;第五:组合选择器;第六:伪元素选择器
什么是html选择器?
就是直接在前边写html标签。如:

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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

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

HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.

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

To achieve the effect of scattering and enlarging the surrounding images after clicking on the image, many web designs need to achieve an interactive effect: click on a certain image to make the surrounding...

The Y-axis position adaptive algorithm for web annotation function This article will explore how to implement annotation functions similar to Word documents, especially how to deal with the interval between annotations...

HTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.
