论坛: 网站建设 标题: 我有麻烦了!高手帮帮我!!!! 复制本贴地址    
作者: trunks [trunks]    论坛用户   登录
我最近在制作网页有一些不懂的地方想请教各位高手:
我用DM4.0制作网页时,在页面中使用了css样式:
body{font-size:9pt;height-size:12pt}
th{font-size:9pt;height-size:12pt}
td{font-size:9pt;height-size:12pt}
a:hover { color:#9999FF; text-decoration: none} 
a:link { color: #0000FF; text-decoration: none}
a:visited {color:#FF3300; text-decoration: none}
我是这样是做的:“文本”----“css样式”----“新建样式”----“使用css选择器”,然后选择我想要的样式,再应用到网页上,按F12浏览,成功!和我想象的一样。
但是,如果我用IE浏览器单独打开它的话,原先的css 样式就一点也没有体现,而且网页上的一些图片还没有显示了(在原先有图片的地方打上了小叉),上传到空间后问题仍然存在。
我在回到DM中,打开网页,在<head> 和</head>之间加上这样一段代码:
<STYLE type=text/css>
body{font-size:9pt;height-size:2pt}
th{font-size:9pt;height-size:2pt}
td{font-size:9pt;height-size:2pt}a:hover { color:#9999FF; text-decoration: none} 
a:link { color: #0000FF; text-decoration: none}
a:visited {color:#FF3300; text-decoration: none}
</STYLE>
而后我无论是按下F12浏览还是用IE打开都和我想象的一样了
我以后总不能在做好网页后再加那样一段代码吧,很麻烦的,我就想用定义的css样式,我该怎么做呢?
还有怎样将定义好的css样式同时应用于所有的网页呢?
各位高手请指教!!!

地主 发表时间: 07/13 00:00

回复: navyblue [navyblue]   论坛用户   登录
将代码保存为文件
在以后的页面中包含该文件就可以了

B1层 发表时间: 07/13 00:02

回复: yaochi [yaochi]   论坛用户   登录
把你的东西保存成XX.CSS文件,然后把
<LINK rel="stylesheet" href="XX.css" type="text/css">
插入网页,OK

B2层 发表时间: 07/13 08:55

论坛: 网站建设

20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon

粤ICP备05087286号