gpt4 book ai didi

安卓 WebView : CSS scale doesn't hide original

转载 作者:行者123 更新时间:2023-11-28 05:33:13 25 4
gpt4 key购买 nike

我目前面临以下问题:

我在我的主要 Activity (API 级别 22)中添加了一个 WebView 并加载了一些网络内容。
在某些时候,您必须从列表中选择一名或多名员工,选择的员工会通过一个小变换来选择:scale( , ) 动画。
但是,WebView 不会在动画期间和之后隐藏原始元素。

图像:http://i.imgur.com/FUAszRu.png

如您所见,保留了原始元素,或者有时只保留了一小部分。

这里是我使用的 CSS:

.employee {
width: 100%;
font-size: 40px;
font-weight: bold;
background-color: #fff;
margin-bottom: 12px;
padding: 70px 12px;
text-align: center;
box-shadow: 0 5px 30px rgba(0, 0, 0, .75);
color: #444;
cursor: pointer;
-o-transition: all 1s ease;
-ms-transition: all 1s ease;
-moz-transition: all 1s ease;
-webkit-transition: all 1s ease;
transition: all 1s ease;
}

.employee.selected {
box-shadow: 0 0 10px rgba(0, 0, 0, .75);
background-color: #E6EE9C;
-o-transform: scale(0.95, 0.95);
-ms-transform: scale(0.95, 0.95);
-moz-transform: scale(0.95, 0.95);
-webkit-transform: scale(0.95, 0.95);
transform: scale(0.95, 0.95);
}

此现象同样适用于 Google Chrome (V:46.0.x) 和标准的 android 浏览器。取消选择一项会立即删除所有其他剩余项。有没有办法用 jQuery 动画而不是 CSS3 来处理这个问题?一种更新我的设备 (Acer Iconia One 10 (nt.lc8ee.001)) 以使其正常工作而不会出现渲染问题的方法?

非常感谢!

最佳答案

现在我使用不同的 CSS 来解决这个问题。我添加了一个包装类+元素:

.employee-wrapper {
height: 180px;
margin-bottom: 12px;
}

并像这样修改其他类:

.employee {
width: 100%;
font-size: 40px;
line-height: 180px;
font-weight: bold;
background-color: #fff;
text-align: center;
box-shadow: 0 5px 30px rgba(0, 0, 0, .75);
color: #444;
cursor: pointer;
margin-top: 0;
}

.employee.selected {
box-shadow: 0 0 10px rgba(0, 0, 0, .75);
background-color: #E6EE9C;
width: 95%;
margin: 6px 2.5%;
line-height: 168px;
font-size: 38px;
}

现在它看起来一样,但有所不同,它不会在我的设备上产生任何渲染问题。

关于安卓 WebView : CSS scale doesn't hide original,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38383225/

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