Skip to content

Commit be0ee59

Browse files
committed
add bootstrap
1 parent 78df880 commit be0ee59

File tree

6 files changed

+956
-3
lines changed

6 files changed

+956
-3
lines changed

docs/.vitepress/config.mts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export default defineConfig({
4040
link: '/front-end/02-JavaScript/'
4141
},
4242
{
43-
text: 'BootStrap',
44-
link: '/front-end/'
43+
text: '03-BootStrap',
44+
link: '/front-end/03-Bootstrap/'
4545
},
4646
{
4747
text: 'ES6',
@@ -152,6 +152,7 @@ export default defineConfig({
152152
sidebar: {
153153
"/front-end/01-HTML5CSS3/": set_sidebar("/docs/front-end/01-HTML5CSS3/"),
154154
"/front-end/02-JavaScript/": set_sidebar("/docs/front-end/02-JavaScript/"),
155+
"/front-end/03-Bootstrap/": set_sidebar("/docs/front-end/03-Bootstrap/"),
155156
},
156157
//---------------------------------------------------------------
157158
// 设置搜索框的样式

docs/front-end/01-HTML5CSS3/10-CSS样式继承.md

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,68 @@ p 自带 上下外边距
1919
em 自带 font-style
2020
strong 自带 font-weight
2121
a 自带 color、text-decorationcursor
22-
ul、ol 自带 padding-left、上下外边距
22+
ul、ol 自带 padding-left、上下外边距 设置list-style为none
2323
input输入框自带 outline属性 有内边框
2424
button的默认显示的尺寸就是border-box
2525
```
2626

27+
**清除CSS自带样式** -- reset.css
28+
29+
```css
30+
/* Reset CSS */
31+
html, body, div, span, applet, object, iframe,
32+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
33+
a, abbr, acronym, address, big, cite, code,
34+
del, dfn, em, img, ins, kbd, q, s, samp,
35+
small, strike, strong, sub, sup, tt, var,
36+
b, u, i, center,
37+
dl, dt, dd, ol, ul, li,
38+
fieldset, form, label, legend,
39+
table, caption, tbody, tfoot, thead, tr, th, td,
40+
article, aside, canvas, details, embed,
41+
figure, figcaption, footer, header, hgroup,
42+
menu, nav, output, ruby, section, summary,
43+
time, mark, audio, video {
44+
margin: 0;
45+
padding: 0;
46+
border: 0;
47+
font-size: 100%;
48+
font: inherit;
49+
vertical-align: baseline;
50+
}
51+
52+
/* HTML5 display-role reset for older browsers */
53+
article, aside, details, figcaption, figure,
54+
footer, header, hgroup, menu, nav, section {
55+
display: block;
56+
}
57+
58+
body {
59+
line-height: 1;
60+
}
61+
62+
ol, ul {
63+
list-style: none;
64+
}
65+
66+
blockquote, q {
67+
quotes: none;
68+
}
69+
70+
blockquote:before, blockquote:after,
71+
q:before, q:after {
72+
content: '';
73+
content: none;
74+
}
75+
76+
table {
77+
border-collapse: collapse;
78+
border-spacing: 0;
79+
}
80+
```
81+
82+
83+
2784
## 权重
2885

2986
```js

docs/front-end/01-HTML5CSS3/30-响应式布局.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,13 @@
133133
<source srcset="./images/Banner-M.png" media="(max-width:1024px)">
134134
<img src="./images/Banner-L.png" alt="">
135135
</picture>
136+
137+
138+
对picture设置样式的时候,只需要设置img的属性就可以
139+
.img{
140+
//参照父元素100%
141+
width:100%
142+
}
136143
```
137144

138145
**方案四 使用 img 标签的 srcset 属性**

docs/front-end/01-HTML5CSS3/34-CSS预处理器.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,24 @@ Less 可以使用 when 关键字实现条件判断
551551
}
552552
```
553553

554+
less条件判断案例--混合的递归调用--栅格动态响应系统
555+
556+
```less
557+
.grid(@type:xs) {
558+
//条件判断:当数量小于栅格列数
559+
.make-col(@num) when (@num <= @columns) {
560+
//变量名拼接 作为类名传入
561+
.col-@{type}-@{num} {
562+
width: percentage((@num/@columns))
563+
}
564+
.make-col(@num+1);
565+
}
566+
.make-col(1);
567+
}
568+
```
569+
570+
571+
554572
### Less 导入
555573

556574
**导入 less 文件:**

0 commit comments

Comments
 (0)