我想要从外部导入CSS样式列表,但总是没有反应
mystyle.css 文件中的代码如下
tr{
font-size:35px;
line-height:15px;
}
使用它的页面的中有如下的代码:
<html>
<head>
<meta charset="GB2312">
<link rel="stylesheet" type="text/css" href="./mystyle.css"/>
<title id='title'>kang jian food medicine clinic welcome to you 康健食疗诊所欢迎您title>
<script language=javascript>//这段代码设置了滚动字幕
var text=document.title
var timerId
function newtext() {
clearTimeout(timerId)
document.title=text.substring(1,text.length)+text.substring(0,1)
text=document.title.substring(0,text.length)
timerId = setTimeout("newtext()", 300)
}
newtext();
script>
head>
但是毫无反应,请问哪位同道可以指点哦,谢谢!
自己解决了,很简单。将link这段代码移到中的最后就可以了,不能比js。
<head>
<meta charset="GB2312">
<title id='title'>kang   jian   food   medicine   clinic   welcome   to   you 康健食疗诊所欢迎您</title>
<script language=javascript>//这段代码设置了滚动字幕
var text=document.title
var timerId
function newtext() {
clearTimeout(timerId)
document.title=text.substring(1,text.length)+text.substring(0,1)
text=document.title.substring(0,text.length)
timerId = setTimeout("newtext()", 300)
}
newtext();
</script>
<link rel="stylesheet" type="text/css" href="./mystyle.css"/>
</head>
copy别人的代码经常这样,有时候重启一下编译器就好了
或者你这个css写错了,把css放上来看看吧,css里不需要写style