Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html chrome浏览器兼容性问题_Html_Css - Fatal编程技术网

Html chrome浏览器兼容性问题

Html chrome浏览器兼容性问题,html,css,Html,Css,我只想为chrome浏览器设置边距和填充 如何仅为chrome浏览器设置css,因为该浏览器有更多的填充或边距请尝试使用 navigator.userAgent 寻求进一步援助 一旦在javascript或jquery中检测到,将带有边距和填充的类添加到正文中请参考以下链接——它肯定会对您有所帮助- 您还可以通过以下脚本检测浏览器-- if(navigator.userAgent.toLowerCase().indexOf('chrome')!=-1){ 文件。写(“”); } 谢谢,如果

我只想为chrome浏览器设置边距和填充


如何仅为chrome浏览器设置css,因为该浏览器有更多的填充或边距

请尝试使用

navigator.userAgent
寻求进一步援助


一旦在javascript或jquery中检测到,将带有边距和填充的类添加到正文中

请参考以下链接——它肯定会对您有所帮助-

您还可以通过以下脚本检测浏览器--


if(navigator.userAgent.toLowerCase().indexOf('chrome')!=-1){
文件。写(“”);
}

谢谢,如果我添加了上述类并对其他类进行了注释,那么我如何申请所有浏览器,那么它将仅对chrome其他类有效,而不会work@user2833721---你能详细说明一下吗。你到底想要什么?我没有从你的评论中得到任何信息。你能检查一下这个网站eheurisic.com/newehs吗?在浏览器中检查右边的Android应用程序和开源定制将在FF中显示正确的东西,但在FF中不显示chrome@user2833721---亲爱的!!但我没有发现在Firefox和Chrome浏览器的页面上有任何不同。结果在两个浏览器中都是一样的。好的,非常感谢。实际上我使用Linux,所以我有问题,我签入windows时,它将在该浏览器中完美工作
<script type="text/javascript">
if (navigator.userAgent.toLowerCase().indexOf('chrome')!=-1){
document.write('<link rel="stylesheet" type="text/css" href="your_script.css"/>');
}
</script>