gpt4 book ai didi

android - polymer TogglePanel 在 iphone 上闪烁

转载 作者:行者123 更新时间:2023-11-29 12:33:43 26 4
gpt4 key购买 nike

我正在尝试使用 polymer 制作单页。这些代码在 android 移动网络和桌面上运行良好,但在 iphone(chrome 和 safari)上,每当我尝试切换菜单栏面板时,屏幕都会闪烁

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>Polymer Single App</title>
<link rel="stylesheet" type="text/css" href="../css/base.css">
<script src="../bower_components/webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="../bower_components/core-toolbar/core-toolbar.html">
<link rel="import" href="../bower_components/core-menu/core-menu.html">
<link rel="import" href="../bower_components/core-item/core-item.html">
<link rel="import" href="../bower_components/core-icons/core-icons.html">
<link rel="import" href="../bower_components/core-scaffold/core-scaffold.html">
<link rel="import" href="../bower_components/core-header-panel/core-header-panel.html">
<link rel="import" href="../bower_components/core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../bower_components/paper-icon-button/paper-icon-button.html">
<link rel="import" href="../bower_components/paper-item/paper-item.html">

<body unresolved fullbleed>
<core-drawer-panel id="drawerPanel" rightDrawer forceNarrow>
<core-header-panel main>
<core-toolbar id="mainheader">
<div flex>
<img src="../images/logo.png" width="152" height="32">
</div>
<paper-icon-button id="navicon" icon="menu"></paper-icon-button>
</core-toolbar>
<div class="content">
If drawer is hidden, press button to display drawer.
</div>
</core-header-panel>
<core-header-panel drawer>
<core-toolbar id="navheader">
<span>Menu</span>
</core-toolbar>
<core-menu>
<core-item label="One"></core-item>
<core-item label="Two"></core-item>
</core-menu>
</core-header-panel>
</core-drawer-panel>
</body>

<script>
document.addEventListener('polymer-ready', function() {
var navicon = document.getElementById('navicon');
var drawerPanel = document.getElementById('drawerPanel');
navicon.addEventListener('click', function() {
drawerPanel.togglePanel();
});
});
</script>
</html>

谢谢!

最佳答案

尝试使用以下 CSS:

* {
-webkit-tap-highlight-color: transparent;
}

关于android - polymer TogglePanel 在 iphone 上闪烁,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26943549/

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