Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/87.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 为什么浏览器视图元素标题标记的格式不正确?_Html_Xhtml - Fatal编程技术网

Html 为什么浏览器视图元素标题标记的格式不正确?

Html 为什么浏览器视图元素标题标记的格式不正确?,html,xhtml,Html,Xhtml,可能重复: 我正在处理一个案例,我必须设置元素的工具提示以中文显示。我已将页面XHTML语言属性设置为zh CN,元素标题标记相应设置如下: <div class="cleditorButton" title="字体颜色" style="background-color: transparent; background-position: -216px 50%; "></div> 但是当我将鼠标悬停在标题上时,标题的格式不正确 这是因为我的电脑上没有安装中文字体

可能重复:

我正在处理一个案例,我必须设置元素的工具提示以中文显示。我已将页面XHTML语言属性设置为zh CN,元素标题标记相应设置如下:

<div class="cleditorButton" title="字体颜色" style="background-color: transparent; background-position: -216px 50%; "></div>

但是当我将鼠标悬停在标题上时,标题的格式不正确


这是因为我的电脑上没有安装中文字体吗

将字符集设置为utf-8,在您的元数据中类似于此

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

您可以参考更多详细答案


这将解释浏览器视图元素

你能看到吗?“这是因为我的电脑上没有安装中文字体吗?”-很可能。你试过安装亚洲字体吗?不,我不能,我有一种感觉,那是因为我不久前从电脑上删除了中文字体。如果是这样的话,那就是好消息。