Skip to content

Commit af21e75

Browse files
LightLight
authored andcommitted
refactor: 优化顶部多色模块的样式
1 parent db80581 commit af21e75

2 files changed

Lines changed: 36 additions & 9 deletions

File tree

src/css/nav.css

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ body.night .search-engine ul::before {
277277
}
278278
.colorful-card i {
279279
font-size: 18px;
280+
margin-left: 5px;
280281
}
281282

282283
.colorful-card span {
@@ -418,3 +419,29 @@ input#is-search-top[type=checkbox].iswitch:before {
418419
input#is-search-top[type=checkbox].iswitch:checked {
419420
padding-left: 14px;
420421
}
422+
423+
zmki_top_main {
424+
display: block;
425+
}
426+
.zmki_top_item {
427+
width: 25%;
428+
float: left;
429+
position: relative;
430+
height: 80px;
431+
padding-left: 15px;
432+
padding-right: 15px;
433+
}
434+
@media screen and (max-width: 768px) {
435+
.zmki_top_item {
436+
padding-left: 7px;
437+
padding-right: 7px;
438+
}
439+
}
440+
.zmki_top_item > a {
441+
height: 60px;
442+
}
443+
.zmki_top_item .zmki_top_text {
444+
overflow: hidden;
445+
text-overflow: ellipsis;
446+
white-space: nowrap;
447+
}

src/index.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,33 +51,33 @@ class="fa fa-heart xiaotubiao"
5151
<?php endif; ?>
5252
<!--顶部新增模块开始 -->
5353
<?php if ($this->options->zmki_top_main == '1') : ?>
54-
<div class="zmki_top_main" style="display: flex;">
55-
<div class="col-lg-4">
54+
<div class="zmki_top_main">
55+
<div class="zmki_top_item">
5656
<a class="colorful-card zmki_top_one" target="_blank"
5757
href="<?php $this->options->zmki_top_main_one_url(); ?>">
5858
<i class="<?php $this->options->zmki_top_main_one_icon(); ?>"></i>
59-
<span class="wapnone"><?php $this->options->zmki_top_main_one_name(); ?></span>
59+
<span class="zmki_top_text"><?php $this->options->zmki_top_main_one_name(); ?></span>
6060
</a>
6161
</div>
62-
<div class="col-lg-4">
62+
<div class="zmki_top_item">
6363
<a class="colorful-card zmki_top_two" target="_blank"
6464
href="<?php $this->options->zmki_top_main_two_url(); ?>">
6565
<i class="<?php $this->options->zmki_top_main_two_icon(); ?>"></i>
66-
<span class="wapnone"><?php $this->options->zmki_top_main_two_name(); ?></span>
66+
<span class="zmki_top_text"><?php $this->options->zmki_top_main_two_name(); ?></span>
6767
</a>
6868
</div>
69-
<div class="col-lg-4">
69+
<div class="zmki_top_item">
7070
<a class="colorful-card zmki_top_three" target="_blank"
7171
href="<?php $this->options->zmki_top_main_three_url(); ?>">
7272
<i class="<?php $this->options->zmki_top_main_three_icon(); ?>"></i>
73-
<span class="wapnone"><?php $this->options->zmki_top_main_three_name(); ?></span>
73+
<span class="zmki_top_text"><?php $this->options->zmki_top_main_three_name(); ?></span>
7474
</a>
7575
</div>
76-
<div class="col-lg-4">
76+
<div class="zmki_top_item">
7777
<a class="colorful-card zmki_top_four" target="_blank"
7878
href="<?php $this->options->zmki_top_main_four_url(); ?>">
7979
<i class="<?php $this->options->zmki_top_main_four_icon(); ?>"></i>
80-
<span class="wapnone"><?php $this->options->zmki_top_main_four_name(); ?></span>
80+
<span class="zmki_top_text"><?php $this->options->zmki_top_main_four_name(); ?></span>
8181
</a>
8282
</div>
8383
</div>

0 commit comments

Comments
 (0)