当显示固定位置叠加时,我无法阻止主体内容滚动.类似的问题已被多次询问,但以前工作的所有技术似乎都不适用于iOS 10中的Safari.这似乎是最近的一个问题.
一些说明:
html和body以overflow: hidden,然而,使主体内容滚动到顶部.touchmove在叠加显示时禁用.这在以前工作,但不再有效.这是完整的HTML源代码:
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<style type="text/css">
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
body {
font-family: arial;
}
#overlay {
display: none;
position: fixed;
z-index: 9999;
left: 0;
right: 0;
top: 0;
bottom: 0;
overflow: scroll;
color: #fff;
background: rgba(0, 0, 0, 0.5);
}
#overlay span {
position: absolute; …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用SASS Compress生成一些精灵,我想将智能布局应用于sprite文件,如文档http://compass-style.org/help/tutorials/spriting/sprite-layouts/
这非常有效:
$sprites: sprite-map("sprite/*.png", $spacing: 20px);
Run Code Online (Sandbox Code Playgroud)
但是当我添加布局时,它会中断; 没有间距,没有智能布局:
$sprites: sprite-map("sprite/*.png", $layout: smart, $spacing:
Run Code Online (Sandbox Code Playgroud)
如何将智能布局应用于生成的精灵?
更新 一段时间后我开始工作了:
$sprite-spacing: 20px;
$sprite-layout: smart;
@import "sprite/*.png";
@include all-sprite-sprites;
Run Code Online (Sandbox Code Playgroud)
但现在我无法让间距发挥作用.精灵很聪明但没有间距.