File tree Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ <h2 class="subheading">{{ page.subtitle }}</h2>
105
105
{% else %}
106
106
< div class ="site-heading ">
107
107
{% endif %}
108
- < h1 > {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</ h1 >
108
+ < h1 class =" title-center " > {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</ h1 >
109
109
< span class ="subheading "> {{ page.description }}</ span >
110
110
</ div >
111
111
</ div >
Original file line number Diff line number Diff line change @@ -506,13 +506,26 @@ samp {
506
506
.intro-header {
507
507
& .style-text {
508
508
background : none ;
509
- .site-heading ,
509
+ .site-heading {
510
+ display : flex ;
511
+ flex-direction : column ;
512
+ justify-content : center ;
513
+ height : 100% ;
514
+
515
+ .title-center {
516
+ text-align : center ;
517
+ width : 100% ;
518
+ transform : translateY (-50% );
519
+ position : absolute ;
520
+ top : 50% ;
521
+ left : 0 ;
522
+ }
523
+ }
510
524
.post-heading ,
511
525
.page-heading {
512
- padding : 85px 0 20px ;
513
- color : @gray-dark ;
514
- .subheading {
515
- margin-bottom : 15px ;
526
+ padding : 20vh 0 10vh ; /* 调整垂直间距 */
527
+ @media only screen and (min-width : 768px ) {
528
+ padding : 22vh 0 ; /* 桌面端间距 */
516
529
}
517
530
}
518
531
.tags {
You can’t perform that action at this time.
0 commit comments