html { overflow: hidden; touch-action: none; content-zooming: none; } body { position: absolute; margin: 0 padding: 0 background: #111; width: 100%; height: 100%; } #canvas { width: 100%; height: 100%; background: #fff; position: absolute; } #text { position: absolute; left: 0; bottom: 10px; width: 100%; pointer-events: none; } #text div { position:absolute; color: #888; left:0 width:100% text-align:center; top:-32px; font-family: 'Poiret One', cursive; font-size:32px; }帮我定位错误
时间: 2024-01-01 07:04:43 浏览: 359
vst-sam-spl-64:一个免费的开源 VST2、VST3 和 AudioUnit 插件,可轻松将样本分成多达 64 个切片
您提供的代码有两处缺少分号:
1. `margin: 0 padding: 0` 应该改为 `margin: 0; padding: 0;`
2. `left:0 width:100% text-align:center;` 应该改为 `left:0; width:100%; text-align:center;`
修改后的代码如下:
```css
html {
overflow: hidden;
touch-action: none;
content-zooming: none;
}
body {
position: absolute;
margin: 0;
padding: 0;
background: #111;
width: 100%;
height: 100%;
}
#canvas {
width: 100%;
height: 100%;
background: #fff;
position: absolute;
}
#text {
position: absolute;
left: 0;
bottom: 10px;
width: 100%;
pointer-events: none;
}
#text div {
position:absolute;
color: #888;
left:0;
width:100%;
text-align:center;
top:-32px;
font-family: 'Poiret One', cursive;
font-size:32px;
}
```
阅读全文