Skip to content

Commit 98335eb

Browse files
committed
update
1 parent 8ba9833 commit 98335eb

File tree

2 files changed

+82
-42
lines changed

2 files changed

+82
-42
lines changed

css_snapshot/emul_snapshot_miscellaneous.css

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ div.alertbox.red {
275275
-webkit-transform: translate(-50%, -50%);
276276
transform: translate(-50%, -50%);
277277
padding: 2em;
278-
background: #F6F6F6;
278+
background: #3c96ff;
279279
}
280280
.modal-window header {
281281
font-weight: bold;
@@ -286,7 +286,7 @@ div.alertbox.red {
286286
}
287287

288288
.modal-close {
289-
color: #aaa;
289+
color: #fff;
290290
line-height: 50px;
291291
font-size: 80%;
292292
position: absolute;
@@ -315,11 +315,15 @@ small {
315315
}
316316

317317
.btn {
318-
background-color: #fff;
318+
background-color: #3c96ff;
319319
padding: 1em 1.5em;
320320
border-radius: 3px;
321321
text-decoration: none;
322-
}
322+
color: white;
323+
}
323324
.btn i {
324325
padding-right: 0.3em;
326+
}
327+
.text{
328+
color: #fff;
325329
}

emul-snapshot-doc.md

Lines changed: 74 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -34,43 +34,6 @@ EMUL为了追求稳定性,更新速度将减慢,直至在EMUL-snapshot里的
3434

3535
- <font color="red">深色模式目前已停止测试</font>
3636

37-
- 全新button(button第一阶段更新)
38-
39-
为了更好的适应移动端,目前EMUL-snapshot测试一种全新的button样式,目前业已完成第一阶段更新,主要更新了小型实心按钮的样式
40-
41-
1.样式改变
42-
全新的样式如下:
43-
44-
<img src="https://coding-pages-bucket-126277-7922605-6465-394446-1304367309.cos-website.ap-hongkong.myqcloud.com/EMUL-docs-img/25.PNG" >
45-
46-
相比原来的样式,现在的小型按钮更"大”了,且更有移动端(安然:越看越像PC)的味道,并且现在新版的小型实心按钮有着更好的文字支持,同时给黄色按钮这种内部文字不容易看清的按钮的内部文字改成了黑色。
47-
48-
2.代码改变
49-
50-
全新的小型实心按钮,去除了后面的"small"字段,所以新版代码如下:
51-
52-
```html
53-
<button class="solid blue">solid blue</button>
54-
55-
<button class="solid green">solid green</button>
56-
57-
<button class="solid yellow">solid yellow</button>
58-
59-
<button class="solid red">solid red</button>
60-
61-
<button class="solid blue large">solid blue large</button>
62-
63-
<button class="solid green large">solid green large</button>
64-
65-
<button class="solid yellow lage">solid yellow lage</button>
66-
67-
<button class="solid red large">solid red large</button>
68-
```
69-
注:若为中空按钮,请把solid改为hollow
70-
且顺序可以随意打乱 (添加large则表示字体变大)
71-
72-
73-
7437
- 翻转卡片的更新
7538

7639
在全新版本,我们更新了翻转卡片,效果如下(日常拿安然试验):
@@ -189,4 +152,77 @@ EMUL为了追求稳定性,更新速度将减慢,直至在EMUL-snapshot里的
189152
<button class="button small green">测试文字</button>
190153
<button class="button small yellow">测试文字</button>
191154
<button class="button small red">测试文字</button>
192-
```
155+
```
156+
157+
- pop-ups弹窗
158+
159+
目前全新的pop-ups弹窗的样式只有一个,等到添加进正式版之后会增多。
160+
161+
![](https://coding-pages-bucket-126277-7922605-6465-394446-1304367309.cos-website.ap-hongkong.myqcloud.com/EMUL-docs-img/29.png)
162+
163+
调用方法为:
164+
165+
```html
166+
167+
<div class="container">
168+
<div class="interior">
169+
<a class="btn" href="#open-modal">Basic CSS-Only Modal</a>
170+
</div>
171+
</div>
172+
<div id="open-modal" class="modal-window">
173+
<div>
174+
<a href="#" title="Close" class="modal-close">X</a>
175+
<h1 class="text">成功!</h1>
176+
<div class="text">我觉得挺好的!哈哈哈哈哈</div>
177+
<div><small>Check out</small></div>
178+
</div>
179+
</div>
180+
```
181+
182+
其中,那个“X”实际上是拟UI中的关闭图标。如果你想要改为更加形象的图标,完全可以调用图标库。这里可以推荐<a href="https://icons.bootcss.com/">bootstrap-icons</a>或者<a href="https://www.iconfont.cn/">iconfont</a>
183+
184+
示例:
185+
186+
```html
187+
<div class="container">
188+
<div class="interior">
189+
<a class="btn" href="#open-modal">Basic CSS-Only Modal</a>
190+
</div>
191+
</div>
192+
<div id="open-modal" class="modal-window">
193+
<div>
194+
<a href="#" title="Close" class="modal-close">
195+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x" viewBox="0 0 16 16">
196+
<path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/>
197+
</svg>
198+
<!--这里引用的就是bootstrap的图标库-->
199+
</a>
200+
<h1 class="text">成功!</h1>
201+
<div class="text">我觉得挺好的!哈哈哈哈哈</div>
202+
<div><small>Check out</small></div>
203+
</div>
204+
</div>
205+
```
206+
![](https://coding-pages-bucket-126277-7922605-6465-394446-1304367309.cos-website.ap-hongkong.myqcloud.com/EMUL-docs-img/30.png)
207+
208+
如果改成文字也是非常行的
209+
210+
```html
211+
<div class="container">
212+
<div class="interior">
213+
<a class="btn" href="#open-modal">Basic CSS-Only Modal</a>
214+
</div>
215+
</div>
216+
<div id="open-modal" class="modal-window">
217+
<div>
218+
<a href="#" title="Close" class="modal-close">关闭</a>
219+
<h1 class="text">成功!</h1>
220+
<div class="text">我觉得挺好的!哈哈哈哈哈</div>
221+
<div><small>Check out</small></div>
222+
</div>
223+
</div>
224+
```
225+
226+
![](https://coding-pages-bucket-126277-7922605-6465-394446-1304367309.cos-website.ap-hongkong.myqcloud.com/EMUL-docs-img/31.png)
227+
228+
这个组件学习了网上的一个版本,并且对其加以改进,比如说颜色、样式、以及对于移动端更加完美的适配。在这里也十分感谢原作者。<a href="https://www.jq22.com/code2521">我最先找到的源地址</a>

0 commit comments

Comments
 (0)