gpt4 book ai didi

css - 预期 "indent"的 Node.js 元素中手写笔的错误是什么,得到 "."?

转载 作者:太空宇宙 更新时间:2023-11-04 09:23:54 25 4
gpt4 key购买 nike

问题

如何在使用 Stylus 预处理器的 CSS 中修复此问题?

背景

我的 CSS 目前正在现有元素中使用。但我正在将元素从 Sinatra 迁移到 NodeJS。这部分意味着我在节点元素中使用手写笔。我将我的代码复制并粘贴到位于 http://beautifytools.com/css-to-stylus-converter.php 的转换器中

错误

enter image description here

代码

*, *:before, *:after
-moz-box-sizing border-box
-webkit-box-sizing border-box
box-sizing border-box

body
font-family Helvetica, sans-serif

body,
div
background-color #222
border 0 none
margin 0
padding 0

@media only screen and (min-width: 35em)
.ir
border 0
font 0/0 a
text-shadow none
color transparent
background-color transparent
.hidden
display none !important
visibility hidden
.visuallyhidden
border 0
clip rect(0 0 0 0)
height 1px
margin -1px
overflow hidden
padding 0
position absolute
width 1px
.invisible
visibility hidden
.clearfix
*zoom 1
&:after
clear both

@media only screen and (min-width: 35em) .visuallyhidden.focusable:active, .visuallyhidden.focusable:focus
clip auto
height auto
margin 0
overflow visible
position static
width auto

@media only screen and (min-width: 35em) .clearfix:before, .clearfix:after
content ""
display table

@import url(https://fonts.googleapis.com/css?family=Montserrat:400,700);
header
background-color #111
height 90px
margin-bottom 30px
position relative
z-index 1

header, header a
color #fff

header
a
text-decoration none
div
text-align center
.title
height 90px
width 100%
margin 0 auto
line-height 1
position relative
z-index 10
h1
font-family "Montserrat", Arial, Helvetica, sans-serif
font-size 60px
margin 0
padding-top 15px
vertical-align middle

.back
font-size 72px
width 60px
position fixed
z-index 20
a
display block

html,
body,
.container,
.mainimg,
.sidebar
height 100%
min-height 100%

.container
background-color #444
margin 0
padding 0
height 100%
min-height 100%
width 100%

.mainimg
background-image url('http://ripsportchalet.com/_assets/img/_main.jpg')
background-repeat no-repeat
background-size cover
display inline-block
width 75%
height 100%
min-height 100%
img
max-width 100%

.sidebar
background-color #000
display inline-block
float right
width 25%
p
color #fff
text-align center
ul
list-style-type none
padding-left 0
li
font-family "Montserrat", Arial, Helvetica, sans-serif
font-size 30px
text-align center
width 100%
a
background #999
color #ffffff
display block
max-width 300px
margin 0 auto 15px
padding 0 10px
text-decoration none

@media (max-width: 767px)
.container
height auto
.mainimg
background-size contain
display block
width 100%
max-width 100%
height 1px
margin 0 auto
padding-bottom 66.666666%
.sidebar
display block
float none
width 100%
overflow hidden

.map-container
max-height 400px
overflow hidden
max-width 100%

.mapimg
height 1px
padding-bottom 66.666%
background-image url('http://ripsportchalet.com/_assets/img/map.png')
background-size contain
background-repeat no-repeat
width 600px
margin 0 auto

ul#thumbnails
background-color #F9F9FA
width 300px
max-width 90%
margin 0 auto 100px
padding-left 10px
li
list-style-type none
line-height 66px
padding-top 3px
vertical-align middle
img
border-radius 5px
cursor pointer
transition 0.3s
float right
margin-right 10px
&:hover
opacity 0.7
&:not(:last-of-type)
border-bottom 1px dashed #777
div
background-color #F9F9FA
line-height 60px
display inline-block
vertical-align middle

.modal
display none
position fixed
z-index 1
padding-top 100px
left 0
top 0
width 100%
height 100%
overflow auto
background-color rgb(0,0,0)
background-color rgba(0,0,0,0.9)

.modal-content
margin auto
display block
width 80%
max-width 720px

#caption
margin auto
display block
width 80%
max-width 700px
text-align center
color #ccc
padding 10px 0
height 150px

.modal-content, #caption
-webkit-animation-name zoom
-webkit-animation-duration 0.6s
animation-name zoom
animation-duration 0.6s

@-webkit-keyframes
zoom
from {-webkit-transform scale(0)

to
-webkit-transform scale(1)
transform scale(1)

}
@keyframes
zoom
from {transform scale(0)
.close
position absolute
top 15px
right 35px
color #f1f1f1
font-size 40px
font-weight bold
transition 0.3s

.close:hover,
.close:focus
color #bbb
text-decoration none
cursor pointer

@media only screen and (max-width: 700px)
.modal-content
width 100%

.wrapper
width 100%
margin 0

#gallery-content
width auto
margin 0 auto
& > div
display block
float left
width 300px
margin 0 20px 20px 0
-webkit-transition left .4s ease-in-out, top .4s ease-in-out .4s
-moz-transition left .4s ease-in-out, top .4s ease-in-out .4s
-ms-transition left .4s ease-in-out, top .4s ease-in-out .4s
-o-transition left .4s ease-in-out, top .4s ease-in-out .4s
transition left .4s ease-in-out, top .4s ease-in-out .4s

.item
img
width 300px
height auto
min-height 200px

最佳答案

您应该在失败的行上添加一个换行符。 @media查询与第一个选择器在同一行;

@media only screen and (min-width: 35em)    .visuallyhidden.focusable:active, .visuallyhidden.focusable:focus

应标注为;

@media only screen and (min-width: 35em)
.visuallyhidden.focusable:active, .visuallyhidden.focusable:focus

预处理器知道 visuallyhidden 选择器是媒体查询的一部分。这也发生在下一个 @media 查询(几行之后)

keyframes 规则也可能会失败;

 @-webkit-keyframes
zoom
from {-webkit-transform scale(0)

to
-webkit-transform scale(1)
transform scale(1)

}

这应该是这样的格式:

 @-webkit-keyframes
zoom
from
-webkit-transform scale(0)
to
-webkit-transform scale(1)
transform scale(1)

关于css - 预期 "indent"的 Node.js 元素中手写笔的错误是什么,得到 "."?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41292714/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com