@@ -5,7 +5,7 @@ aside { position: absolute; left: 0; top: 64px; bottom: 0; width: 250px; backgro
55aside > h2 { font-size : 1.2em ; margin-bottom : .25em ; }
66
77header {position : fixed;left : 0 ; right : 0 ; background-color : # 0C121A ; z-index : 2 ; box-shadow : 0 1px hsla (0 , 0% , 100% , .1 ), inset 0 -1px # 000 ; color : # fff ; height : 64px ; }
8- .version {margin-left : 1ch ;font-weight : 400 ; font-size : 14px ;}
8+ .logo . version {margin-left : 1ch ;font-weight : 400 ; font-size : 14px ;}
99.logo-h {margin : 0 ; position : absolute;}
1010.logo {display : block; width : 230px ; line-height : 60px ;padding : 0 10px ;overflow : hidden; font-family : x-locale-heading-primary, zillaslab, Palatino, "Palatino Linotype" , x-locale-heading-secondary, Source Han Serif SC, STZhongsong, simsun, serif; color : # fff7c7 ;transition : .2s ;}
1111.logo ::before {content : '' ; background : url (logo-128.png) no-repeat center / 48px 48px ; float : left; height : 64px ; width : 64px ; margin-left : -12px ;}
@@ -43,6 +43,7 @@ aside, .content { -webkit-overflow-scrolling: touch; }
4343.content h1 sub { margin-top : -20px ; font-weight : normal; font-size : 12px ; letter-spacing : -1px ; color : # ddd ; position : absolute; pointer-events : none; }
4444.content h2 { margin-top : 0 ; margin-bottom : 20px ; padding : 10px ; background-color : # C1D2EE ; font-size : 16px ; text-shadow : 1px 1px # eee ; }
4545.content h3 { margin : 20px 0 10px ; padding : 8px 10px ; background-color : # cad5eb ; font-size : 14px ; color : # 565656 ; }
46+ .content h3 .active { filter : hue-rotate (180deg );}
4647.content h4 {margin : 1em 0 .5em ; padding : 0 10px ; font-size : 14px ; color : # 565656 ;}
4748.content p { margin : 10px ; color : # 565656 ; }
4849.content p : hover { color : # 333 ; }
@@ -51,7 +52,7 @@ aside, .content { -webkit-overflow-scrolling: touch; }
5152.content li { margin-top : 10px ; color : # 666 ; }
5253.content li : hover { color : # 333 ; }
5354code > a : hover { background-color : # f0f3f9 ; color : # 333 ; text-decoration : none; }
54- .content pre { display : block; padding : 10px ; margin : 10px ; border : 1px dotted # 00c ; color : # 00c ; font-family : "Lucida Console" , Monaco, monospace; white-space : pre-wrap; word-wrap : break-word; }
55+ .content pre { display : block; padding : 10px ; margin : 10px ; border : 1px dotted # 00c ; color : # 00c ; font-family : "Lucida Console" , Monaco, monospace; white-space : pre-wrap; word-wrap : break-word; tab-size : 4 ; }
5556.content li pre { margin-left : 0 ; margin-right : 0 ; }
5657pre .comment { color : green; }
5758.content li p { margin-left : 0 ; margin-right : 0 ; }
@@ -79,58 +80,83 @@ pre .comment { color: green; }
7980.content .button { border : 1px solid rgba (0 , 0 , 0 , .1 );padding : 10px 50px ; min-width : 50px ; font-size : medium; text-align : center; }
8081.content .button : hover {filter : saturate (1.5 )}
8182
83+ [is-runable ] {
84+ background-color : # fff ;
85+ }
86+ [is-runable ] button {
87+ position : sticky;
88+ top : 50vh ;
89+ background-color : # eb4646 ;
90+ color : # fff ;
91+ float : right;
92+ width : 150px ; height : 40px ;
93+ border : 0 ;
94+ font-size : 16px ;
95+ border-radius : 4px ;
96+ }
97+
98+ .iframe-example {
99+ display : none;
100+ position : fixed;
101+ width : 375px ; height : 667px ;
102+ background : # fff url ("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Ctext x='50%25' y='50%25' font-size='12' fill='%23a2a9b6' fill-opacity='0.3' font-family='system-ui, sans-serif' text-anchor='middle' dominant-baseline='middle' transform='rotate(-45, 100 100)'%3E示例效果%3C/text%3E%3C/svg%3E" );
103+ inset : 0 ;
104+ margin : auto;
105+ z-index : 9 ;
106+ border : solid;
107+ outline : 9999px solid rgba (0 , 0 , 0 , .5 );
108+ }
109+ .iframe-example [open ] {
110+ display : block;
111+ }
112+ @supports not (inset : 0 ) {
113+ .iframe-example {
114+ left : 0 ; right : 0 ; bottom : 0 ; top : 0 ;
115+ }
116+ }
117+ @media (max-width : 480px ) {
118+ .iframe-example {
119+ display : block;
120+ position : static;
121+ width : calc (100% - 6px );
122+ outline : none;
123+ }
124+ }
125+
126+
82127del { display : inline-block; opacity : .6 ; }
83128
84129/* slide up */
85130.slideup .out {
86- -webkit-animation-name : slideouttotop;
87131 animation-name : slideouttotop;
88132}
89133.slideup .in {
90- -webkit-transform : translateY (0 );
91- -webkit-animation-name : slideinfrombottom;
92134 transform : translateY (0 );
93135 animation-name : slideinfrombottom;
94136}
95137.slideup .in .reverse {
96- -webkit-animation-name : slideinfromtop;
97138 animation-name : slideinfromtop;
98139}
99140.slideup .out .reverse {
100- -webkit-transform : translateY (100% );
101- -webkit-animation-name : slideouttobottom;
102141 transform : translateY (100% );
103142 animation-name : slideouttobottom;
104143}
105144
106- @-webkit-keyframes slideinfromtop {
107- from { -webkit-transform : translateY (-100% ); }
108- to { -webkit-transform : translateY (0 ); }
109- }
110145@keyframes slideinfromtop {
111146 from { transform : translateY (-100% ); }
112147 to { transform : translateY (0 ); }
113148}
114- @-webkit-keyframes slideinfrombottom {
115- from { -webkit-transform : translateY (100% ); }
116- to { -webkit-transform : translateY (0 ); }
117- }
149+
118150@keyframes slideinfrombottom {
119151 from { transform : translateY (100% ); }
120152 to { transform : translateY (0 ); }
121153}
122- @-webkit-keyframes slideouttotop {
123- from { -webkit-transform : translateY (0 ); }
124- to { -webkit-transform : translateY (-100% ); }
125- }
154+
126155@keyframes slideouttotop {
127156 from { transform : translateY (0 ); }
128157 to { transform : translateY (-100% ); }
129158}
130- @-webkit-keyframes slideouttobottom {
131- from { -webkit-transform : translateY (0 ); }
132- to { -webkit-transform : translateY (100% ); }
133- }
159+
134160@keyframes slideouttobottom {
135161 from { transform : translateY (0 ); }
136162 to { transform : translateY (100% ); }
0 commit comments