0%

CSS 彻底研究(3)-浮动,定位

$1 一 . 浮动 float
$1 I . 定义及规则
float 默认为 none,对应标准流的情况。当float : left;时,元素就会向其父元素的左侧靠紧,脱离标准流,同时宽度不再伸展至充满父容器,而是根据自身内容来确定。
$1 II . 演示规则
准备代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style>
body
{
margin: 0;
padding: 0;
}

#father
{
background-color: cyan;

/*父级div 没有定位 造成子div的margin-top传递给父级*/
position: absolute;
}

#father *
{
margin: 10px;
padding: 10px;
border: 1px dashed red;
}

#son1
{
}

#son2
{
}

#son3
{
}
</style>
</head>
<body>
<div id="father">
<div id="son1">#son1</div>
<div id="son2">#son2</div>
<div id="son3">#son3-son3son3son3</div>
<p>
这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字这是文字
</p>
</div>
</body>
</html>
阅读全文 »

基本选择器

  1. 标记选择器h1 {...}
  2. 类别.class_name{...},两个 class 同时作用,如class = 'one two',冲突取前者
  3. ID 选择器 #id{...}

复合选择器:两个或多个选择器,通过不同的方式连接

阅读全文 »

1.menu 启用 categories

  1. hexo new page categories
  2. 修改/source/categories/index.md
  3. 改为
    layout: categories
    title: categories

阅读全文 »

CLR 的执行模型

模块/程序集

1.模块

托管模块组成部分

  • PE32/PE32+头 : PE 即 Portable Executable 表示可执行文件
  • CLR 头 : 包含所需的 CLR 版本,Main 方法入口
  • 元数据 : 元数据是一组数据表.其中的一些数据表描述了模块中定义的内容,比如类型或成员。还有一些描述了托管模块引用的内容,比如导入的类型、成员。
  • IL 代码
    阅读全文 »

hexo 目录下的source子目录包含了写作的 md 文件,在hexo deploy 中是 push 到 github pages 的 master 分支,这样我们可以将整个 hexo 目录 push 到该 project 的hexo分支

阅读全文 »