■■页面中table的td的字体怎么改呀?我定义样式表不起作用。?请看:■■

yyhyan 2003-08-09 12:30:47
<style type=text/css>
.td-1={font-size: 14pt;}
</style>

<table>
<tr>
<td class=td-1>
中国
</td>
</tr>
</table>
怎么字体没有改变呢?
...全文
423 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
yyhyan 2003-08-09
  • 打赏
  • 举报
回复
■■lizexpert(liz) ■■
你这样是可以的,
但我页面中引用了一个公用的.css样式表,有td的定义,是不是和它冲突了,
那么如何使用自己定义的字体覆盖样式呢?
lizexpert 2003-08-09
  • 打赏
  • 举报
回复
<html>
<head>
<title>¿Î¼þ</title>
</head>
<style type=text/css>
.td-1 {font-size: 200pt;}
</style>

<body>


<table>
<tr>
<td class=td-1>
中国
</td>
</tr>
</table>

</body>
</html>

我这样写的 在ie中式了,没问题
shyslysky 2003-08-09
  • 打赏
  • 举报
回复
.td-1{font-size: 14pt;}
yyhyan 2003-08-09
  • 打赏
  • 举报
回复
■■ lizexpert(liz) :■■
我误写错了,
这样还是不行的
lizexpert 2003-08-09
  • 打赏
  • 举报
回复
改为

<style type=text/css>
.td-1 {font-size: 14pt;}
</style>

基把等号去掉
shyslysky 2003-08-09
  • 打赏
  • 举报
回复
<style type=text/css>

td{font-size: 200pt; }
.td-1 {font-size: 20pt;}
</style>

<body>


<table>
<tr>
<td class=td-1 >
中国
</td>
<td>
北京
</td>
</tr>
</table>
shyslysky 2003-08-09
  • 打赏
  • 举报
回复
<style type=text/css>
.td-1 {font-size: 200pt;}
</style>

<body>


<table>
<tr>
<td class=td-1 style="FONT-SIZE: 28px">
中国
</td>
</tr>
</table>

</body>

87,988

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧