Joh*_*lia 5 css google-chrome google-chrome-extension web
我在使用Google Chrome时出现问题:19.0.1084.52米,当我安装了Ask Toolbar时,它会破坏网站布局.
见打印屏幕:
Chrome中的工具栏是否会影响网站?
编辑:我想我应该将所有内容包装在一起<div>
并移动背景图像,<body>
尽管有没有更好的选择而不添加这个额外的标记?
Javascript代码段可以禁用chrome中的ask工具栏.我希望这个功能快速传播!!
function removeAsk(){
if(document.getElementById("apn-null-toolbar") != null){
// mainMenu had a style change for its top positioning, returning it to normal
// perhaps a function can be made which iterates over every element ask has changed
document.getElementById("mainMenu").style.top = "-16px";
// Just remove the iframe and style elements
(elem=document.getElementById("apn-null-toolbar")).parentNode.removeChild(elem);
(elem=document.getElementById("apn-body-style")).parentNode.removeChild(elem);
}
}
Run Code Online (Sandbox Code Playgroud)
在body onload之后调用此方法
<body onload="removeAsk()">
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2486 次 |
最近记录: |