zoukankan      html  css  js  c++  java
  • CSS简短总汇1

    CSS 层叠样式表。Cascading Style Sheet

    一、层叠样式表的分类: 1.外部——.css文件 2.内嵌——<head></head> 3.内联——放在标记的style属性上

    二、选择器。 (一)基本选择器 1.ID选择器:# 2.class选择器:. 3.标签选择器:标签名

    (二)组合选择器 1.用逗号隔开。并列关系 2.用空格隔开。后代关系。 3.筛选:选择器.class选择器。

    “层叠”的意思? 1.样式表类型的层叠。——例子。 2.选择器的层叠。——例子 3.父子元素的层叠。——例子。

    优先级: 1.一般来说,ID选择器优先级要高于class选择器的优先级,class选择器的优先级高于标签选择器的优先级。 2.对于同一类型的选择器,内联样式的优先级要高于内嵌,内嵌样式的优先级要高于外部的。

    三、样式表的属性: (一)前景与背景 1.背景: background-color:背景色。 background-image:url(路径)  背景图 background-attatchment:  fixed-背景固定;scroll-背景与文字一起滚动 background-repeat: repeat:平铺;no-repeat:不平铺; repeat-x,repeat-y. background-position: right 100px bottom 200px;

    2.前景: font-family: font-size: color: font-weight:bold(加粗) font-style:italic(倾斜) text-decoration: underline(下划线),overline(上划线),line-through(删除线) text-align: left,center,right vertical-align: top,middle,bottom line-height:行高。一般是font-size的1.5-2(em)倍。

    (二)边界与边框 1.边框:二维表格。 2.外边距:margin(表外间距-上、右、下、左),margin-top,.... 3.内边距:padding(内容与单元格间距-上、右、下、左),padding-top......

  • 相关阅读:
    Eclipse无法正常启动,弹出对话框内容为 A Java Runtime...
    redis入门常用的命令操作(总结 一)
    初级工程师的面试
    公司金融学理论--MM理论
    以太坊开发环境搭建
    如何以树形结构显示文件目录结构
    Neural Network Basics
    大前端公共知识梳理
    出SS表
    iOS weak关键字
  • 原文地址:https://www.cnblogs.com/xianshui/p/4435915.html
Copyright © 2011-2022 走看看