yuhezheng 2012-09-09 20:04:08 5100次浏览 3条回复 0 0 0

这是我做的默认设置,虽然下拉框中默认显示的是“新宋体”,或“微软雅黑”,而且输入框显示的也是16px,但是保存后就不对了,好像还是原来默认的11px,挺小的不知道咋办?

config.Language = 'zh-cn';
config.font_names='新宋体;宋体;微软雅黑;黑体;仿宋_GB2312;楷体_GB2312;隶书;幼圆;'+ config.font_names;
config.font_defaultLabel = '微软雅黑;
config.fontSize_defaultLabel = '16px';

可以看到,在编辑时是16px,但是不是微软雅黑,保存后连默认大小也没了,完全变成了系统默认了。 保存前: [attach]886[/attach] 保存后 [attach]887[/attach]

  • 回复于 2012-09-09 21:58 举报

    楼主修改的是字体和字体大小的默认标签,而不是默认大小。
    应该去修改CSS(contents.css)

    body
    {
    	/* Font */
    	font-family: Arial, Verdana, sans-serif;
    	font-size: 12px;
    
    	/* Text color */
    	color: #222;
    
    	/* Remove the background color to make it transparent */
    	background-color: #fff;
    }
    

    改为

    body
    {
    	/* Font */
    	font-family: 微软雅黑, 黑体,宋体;
    	font-size: 16px;
    
    	/* Text color */
    	color: #222;
    
    	/* Remove the background color to make it transparent */
    	background-color: #fff;
    }
    
  • 回复于 2012-09-10 11:42 举报

    顶楼上正解

  • 回复于 2012-09-10 12:12 举报

    [attach]888[/attach]
    那个方法不错,可是出现了一种奇怪的情况,你们看,默认输入的显示正确“微软雅黑”和“16px”,但是直接保存,显示出来,就不对了。为什么呢?:)
    [attach]889[/attach]
    难道是Yii默认的改变了

您需要登录后才可以回复。登录 | 立即注册