今天给各位分享dedecms调整行间距的知识,其中也会对进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!
本文目录一览:
1、ckeditor怎么添加行距
由于dedecms将ckeditor做了集成,和一般的只针对于ckeditor对config.js修改不同,以后是我在dedecms 5.7版本上添加行间距按钮的方法:
1、下载ckeditor的行距插件包 ;
2.解压到ckeditor/plugins目录下;
3、由于dedecms 5.7自己集成了一个dedepage插件,用来添加ckeditor自定义插件,在/include/ckeditor/plugins/dedepage文件夹下,打开plugin.js文件在最后面添加: requires : [ 'lineheight' ],添加完之后的代码如下:
// Register a plugin named "dedepage".
(function()
{
CKEDITOR.plugins.add( 'dedepage',
{
init : function( editor )
{
// Register the command.
editor.addCommand( 'dedepage',{
exec : function( editor )
{
// Create the element that represents a print break.
// alert('dedepageCmd!');
editor.insertHtml("#p#副标题#e#");
}
});
// alert('dedepage!');
// Register the toolbar button.
editor.ui.addButton( 'MyPage',
{
label : '插入分页符',
command : 'dedepage',
icon: 'images/dedepage.gif'
});
// alert(editor.name);
},
requires : [ 'fakeobjects' ],
requires : [ 'lineheight' ]
});
})();
4、修改/include/ckeditor/ckeditor.inc.php文件,在$toolbar['Basic'] 的最后一行添加元素Code,修改后代码如下:
$toolbar['Basic'] = array(
array( 'Source','-','Templates'),
array( 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Print'),
array( 'Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
array( 'ShowBlocks'),array('Image','Flash','Addon'),array('Maximize'),'/',
array( 'Bold','Italic','Underline','Strike','-'),
array( 'NumberedList','BulletedList','-','Outdent','Indent','Blockquote'),
array( 'JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'),
array( 'Table','HorizontalRule','Smiley','SpecialChar'),
array( 'Link','Unlink','Anchor'),'/',
array( 'Styles','Format','Font','FontSize'),
array( 'TextColor', 'BGColor', 'MyPage','MultiPic'),
array( 'lineheight')
);
至此OK!
ps,简单的自定义行距功能
1.修改该功能的语言,在lineheight(就是行距插件的目录)/lang目录下添加相应的语言包,修改plugin.js文件115行为相应的语言。
2.更改行距的功能按钮,修改plugin.js文件139行。
2、织梦后台如何调整默认文本格式?
1、一步,在网站空间根目录的上传文件夹,找到系统默认的dede文件夹。根据不同网站服务商提供的服务不同,选择不同的FTP连接到空间的网站根目录里即可找到。选中并右键点击菜单选重命名(依各网站空间服务商的提供的系统显示会有不同)即可。然后刷新。如图所示。这里修改成dedetest
2、修改后再按原来的访问地址已经访问不了。别人也不知道应该从什么地方访问你的网站后台了。从而保证了系统一定的安全。然后键入正确的后台地址即可访问。
3、ckeditor如何添加行距按钮
由于dedecms将ckeditor做了集成,和一般的只针对于ckeditor对config.js修改不同,以后是我在dedecms 5.7版本上添加行间距按钮的方法:
1、下载ckeditor的行距插件包 ;
2.解压到ckeditor/plugins目录下;
3、由于dedecms 5.7自己集成了一个dedepage插件,用来添加ckeditor自定义插件,在/include/ckeditor/plugins/dedepage文件夹下,打开plugin.js文件在最后面添加: requires : [ 'lineheight' ],添加完之后的代码如下:
// Register a plugin named "dedepage".
(function()
{
CKEDITOR.plugins.add( 'dedepage',
{
init : function( editor )
{
// Register the command.
editor.addCommand( 'dedepage',{
exec : function( editor )
{
// Create the element that represents a print break.
// alert('dedepageCmd!');
editor.insertHtml("#p#副标题#e#");
}
});
// alert('dedepage!');
// Register the toolbar button.
editor.ui.addButton( 'MyPage',
{
label : '插入分页符',
command : 'dedepage',
icon: 'images/dedepage.gif'
});
// alert(editor.name);
},
requires : [ 'fakeobjects' ],
requires : [ 'lineheight' ]
});
})();
4、修改/include/ckeditor/ckeditor.inc.php文件,在$toolbar['Basic'] 的最后一行添加元素Code,修改后代码如下:
$toolbar['Basic'] = array(
array( 'Source','-','Templates'),
array( 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Print'),
array( 'Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'),
array( 'ShowBlocks'),array('Image','Flash','Addon'),array('Maximize'),'/',
array( 'Bold','Italic','Underline','Strike','-'),
array( 'NumberedList','BulletedList','-','Outdent','Indent','Blockquote'),
array( 'JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'),
array( 'Table','HorizontalRule','Smiley','SpecialChar'),
array( 'Link','Unlink','Anchor'),'/',
array( 'Styles','Format','Font','FontSize'),
array( 'TextColor', 'BGColor', 'MyPage','MultiPic'),
array( 'lineheight')
);
至此OK!
ps,简单的自定义行距功能
1.修改该功能的语言,在lineheight(就是行距插件的目录)/lang目录下添加相应的语言包,修改plugin.js文件115行为相应的语言。
2.更改行距的功能按钮,修改plugin.js文件139行。
4、高分找高手帮忙修改下dedecms模板和css
参考下面方法
首先,打开后台——模板——默认模板管理——index.htm.
看到有一句,
rel="stylesheet" media="screen" type="text/css" /说明,模板是根据这个 CSS 来布局网
页的,于是就打开网站目录下面的templets\style\dedecms.css.然后来分析一下CSS的构成。
根据主页的调用,来研究 CSS 这样容易理解。打开主页模板,找到:
那么 w960 center clear mt1 都定义了什么呢?打开 DEDECMS.CSS 找打相关的定义。
.center{
1. margin:0px auto; 定义了CSS 模块的边缘位置都是 0,也就是这个center 的层
距离上右下左都是 0px;
2. }
3. .w960{
4. width:960px; 定义了整体的宽度为 960px;
5.
6. }
7. .pright .infos_userinfo {
8. margin-bottom: 0px; 定义了首页右部下的互动中心的下面边缘为 0px;
9. }
10. .mt1{
11. margin-top:8px; 定义了mt1 的顶部边缘为8px;
12. }
13. .pright .mt1{
14. margin-top:0px; 定义了pright 下面的mt1 顶部边缘为0px;
15. }
16. .mt2{
17. margin-top:16px; 顶部边缘为16px;
18. }
19. .clear{
20. overflow:hidden; 如果clear 层里面的内容超出了 层的范围 就隐藏起来。
21. }
这个pleft 的定义没有在dedecms.css 中,但是会发现一句
话
@import url("layout.css");
@import url("page.css");
这说明,在dedecms.css 中引用了 page.css 和layout.css 这两个样式表,于是就在
page.css 中找到了pleft 的定义
.pleft{
width:712px;定义了宽度
float:left;该层向左浮动
overflow:hidden;超出范围则隐藏
}
在该层下面调用的是新闻头条的内容,看看它的 css
.index .bignews{
width:424px;
height:400px;
float:right; 向右浮动
border:1px solid #DFF2F5;表示边框线用 #dff2f5 的实体颜色填充
background:url(../images/headbg-top.gif) repeat-x;背景图片为 headbg-top.gif 并且横
向平铺
overflow:hidden;超出则隐藏。
}
所以,看到头条的这部分是在 flash 幻灯片右边显示,并且加上了浅蓝色的边框线。
再来看看 onenews 是如何定义的。
.index .bignews .onenews{
margin:0 3px 0 3px; 左右外边距分别空3 个像素
padding:7px 6px;上左内边距分别空7,6 个像素
border-bottom:1px dashed #EBEBEB;下边框加一个 #ebebeb 的虚线
}
所以看见头条的文章左右都有一定的距离,并且下面还有一个虚线显示
这个下面调用的是以往的头条,默认的有 4 篇文章,调用了d1 d1arc 2 个css
.index .bignews div.d1{
padding:6px 10px;
clear:both;这句话是清除浮动,如果不加它,大家可以试试看,是不是 d1 这个层就跑到 头条的
右边了。
width:406px;
overflow:hidden;
}
.index .bignews div.d1arc{
margin-right:12px;
width:190px;
float:left;因为此时要调用4 篇文章,改文章是 2*2 排列的,如果不加这个属性,新闻就应该垂
直排列了(因为刚才用 clear:both 清除浮动啦),大家试试看是不是这样的。
height:24px;
line-height:24px;行间距,即字体最底端与字体内部顶端之间的距离
overflow:hidden;
}
最新文章
下面看看 newarticle 这个css 吧,还是拿快学网的首页举例子,上面的这句是用来显示 “最近
更新”那几个绿颜色字的,看看它是怎么定义的。
.index .bignews div.newarticle{
height:24px; 高度
background:url(../images/new-article.gif) 8px 3px no-repeat;背景图片在x 轴8px 和y 轴
3px 出出现
font-size:0px;
color:#fff;
} 所以,能看到那个最近更新并且还有一个横条,其实它是个图片,大家右键图片另存为
看看就知道了
这里面调用了 c2 和ico1 两个 css
.index .bignews ul.c2{
width:416px;
padding:0px 4px 0px; 内边距为 上0 右4 下0
clear:both;清除浮动 和上面的意思一样
overflow:hidden;
}
ico1 这个css 在layout.css 中了。
.ico1 li{
padding-left:16px; 指的是 新闻列表左内边距为 16px
background:url(../images/ico-1.gif) 7px 11px no-repeat; 背景在7px,11px 处出现,所以看到最新文章的列表左边都有一个小黑点,这个小黑点就是 ico-1.gif
}
到此,中部的头条新闻和最近更新已经分析完了。
看看flash 的 css 定义
.index .flashnews{
width:280px;
height:192px;
overflow:hidden;
float:left;这句决定了,flash 的新闻列表在 头条的左边显示。如果把 bignews 和flashnews
的float 属性互换一下应该是上面结果呢?大家试试看。
}
这边是特别推荐调用的样式,还是来看看 css
.index .latestnews{
width:280px;
height:200px;
margin-top:8px;
float:left;
}
.index .latestnews dl dd{
padding:2px 5px;
}
.index .latestnews ul a{
color:#555;
} 这里面就不用解释了吧,可以和上面的对照一下就能明白上面意思了。关键 dl dt dd 要弄明白
是什么意思。
dl 内容块
dt 内容块的标题
dd 内容
可以这么写:
标题
内容1
内容2
在layout.css 中找到 tbox 的相关定义,其他的都不用罗嗦了,只有一句大家注意看一
下
.tbox dt strong{
height:26px;
line-height:26px; !important;line-height:25px; 这一句是为了兼容 IE 和FF,比如
font-size: 12px !important;
font-size: 13px;
在 IE里面,由于 IE不理解 !important,则字体大小按照最后设定的 13px 展示
而FF 里面, !important 为提高优先级别,则字体大小按照 !important标记的12px 展示
某些css 某些代码在这两类浏览器里的显示是有差别的(注意这也是使用!important 的主要原因
所在),比如height: 21px;,在 IE6 和(IE7,FF)里显示就有差别,后者(IE7,FF)会比前
者(IE6)少一个像素。
padding-left:22px;
padding-right:4px;
display:block;//变成块级 ,因为strong 是内联元素,必须强制转换,不然的话是没有办法
定义padding 的。大家可以百度一下 内联元素看看。
float:left;
color:#397CBE;
background:url(../images/fbico.gif) 5px 6px no-repeat;
letter-spacing:1px;
}
dedecms调整行间距的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于、dedecms调整行间距的信息别忘了在本站进行查找喔。