Home  >  Article  >  Web Front-end  >  CSS学习总结_html/css_WEB-ITnose

CSS学习总结_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-21 08:55:481156browse

CSS学习总结

一、简介

        W3C的介绍中介绍CSS 指层叠样式表 (Cascading Style Sheets), 样式定义如何显示 HTML 元素。浏览器将内容装在一个元素里面(一个盒子),然后CSS通过调整盒子背景、大小、颜色、样式、内容的文本以及字体的大小,最后展示出我们需要的排版样式。

         css在使用的过程中,有很多的参数需要记忆。特别是还有很多的浏览器的有自己独有的参数,很难记忆。只有多使用,多查文档。用的时候可以到w3c.com中查询        http://www.w3school.com.cn/cssref/index.asp


二、盒子模型

        浏览器在处理HTML标签的时候,都是通过盒子模型进行排版。将内容放在这种盒子容器内,根据容器是行内标签和块级标签最后在浏览器中形成样式。下面是W3C网站的介绍

    

     我们用通过CSS来排版,在浏览器中形象的展示出,它们之间的区别

<!DOCTYPE html><html><head>	<style>		.test{			background : gray;			border : 5px solid red;						height : 20px;			width : 250px;			font : italic bold 12px/20px arial,sans-serif;						margin: 22px;			padding : 25px;		}	</style></head><body>	<div class="test">Begin Test Cascoding Style Sheets</div></body></html>

    效果图


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn