jquery - Cufon 行高问题

标签 jquery css fonts

当我在 CSS 或 javascript 中应用行高时,它并没有这样做。如果我在脚本中应用,我会收到以下错误。

Error: missing : after property id
Line: 26, Column: 44
Source Code:
Cufon.replace('#header .lists li a', {line-height: '120%;', font-size: '120%'}); 

JavaScript

$(document).ready(function() 
{

    Cufon.replace('#header .lists li a', {line-height: '120%;', font-size: '120%'});

});

样式.css

#header .lists { float:left; position:relative; width:776px; height:40px; list-style:none; padding:0; margin:0; margin-top:1px; background:url(../images/bg_mainmenu_off.gif); z-index:100; }
#header .lists li {float:left; height:40px; display:inline; background:url(../images/bg_mainmenu_off.gif) repeat-x;}
#header .lists li a {display:block; width:150px; height:40px; line-height:40px; text-decoration:none; font-size:16px; font-weight:bold; text-indent:10px; font-weight:bold; color:#FFFFFF; margin: 0px; }
#header .lists li a:hover { background:url(../images/bg_mainmenu_on.gif) repeat-x; }
#header .lists div {display:none; }
#header .lists :hover div {display:block; position:absolute; background:#FFFFFF; top:26px; border:1px solid #ece7d1; padding-bottom:10px;}
#header .lists :hover div dl { float:left; width:179px; display:inline; padding:5px; margin:0 5px 10px 5px;}
#header .lists :hover div dl dt { width:179px; height:16px; background:#b39f87; margin:5px 0 10px 0; text-decoration:none; }
#header .lists :hover div dl dd {padding:0; margin:0;}
#header .lists :hover div dt a { display:block; height:14px; line-height:14px; font-size:14px; color:#FFFFFF; font-weight:bold; text-decoration:none;}
#header .lists :hover div dt a:hover { background:none;}
#header .lists :hover div dd a { display:block; height:14px; line-height:14px; font-size:14px; color:#b39f87; font-weight:normal; text-decoration:none; }
#header .lists :hover div dd a:hover {text-decoration:underline; background:none;}

最佳答案

有一个known bug in Cufon that will probably not be fixed关于具有非严格文档类型的页面上的不稳定行高识别。

关于jquery - Cufon 行高问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2088798/

相关文章:

javascript - 无障碍动态动画信息框

javascript - 海图.js : Possible to map paths/text to tick marks?

css - 无法编辑特定的 CSS 文件

c# - 如何使用.net更改word文档的字体大小

javascript - 在当前工具提示文本 JQuery 旁边 append 或添加新文本

javascript - 如何防止用户删除文本输入中的前三个字符?

html - CSS 在表格内容的左侧和右侧应用空白

java - 从 jar 运行时字体无法正确加载

php - PHP/Apache 中的 Inkscape 不会将字体呈现为 PNG

jquery - 从 $.ajax 成功操作 "data": function(data) {