如果使插入单元格里的text的大小和单元格一样

tinybrilliant 2003-09-02 05:35:00
现在在单元格里插入一个style为text,想使这个text的背景颜色为蓝色时,整个单元格也为蓝色。条件是颜色的赋值必须在<input style="text"...>里进行。请问改怎么写?谢谢
...全文
81 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
tinybrilliant 2003-09-03
  • 打赏
  • 举报
回复
zxuan() ,谢谢。不过,用你的方法,还是不能够使td的背景颜色被遮掩。我想做的是红色被完全遮掩


<html>
<head>
</head>
<body>
<table>
<tr bgcolor="red">
<td><input type="text" readonly value="aaaa" style="font-size: 100%;background-color:

#0099FF;"><td>
</tr>
</table>
</body>
</html>
lucbesson 2003-09-03
  • 打赏
  • 举报
回复
是不是这样啊 ?

<input type=text type=background-color:blue>
zxuan 2003-09-03
  • 打赏
  • 举报
回复
或者,
<table cellpadding="0">
<tr>
<td><input type="text" readonly value="aaaa" style="font-size: 100%;background-color:

#0099FF;"><td>
</tr>
</table>
尽量绕过问题就行了
zxuan 2003-09-03
  • 打赏
  • 举报
回复
<table>
<tr bgcolor="#0099FF">
<td><input type="text" readonly value="aaaa" style="font-size: 100%;background-color: #0099FF; border:0px"><td>
</tr>
</table>
zxuan 2003-09-02
  • 打赏
  • 举报
回复
<input type="text" style="font-size: 100%;background-color: #0099FF;">
tinybrilliant 2003-09-02
  • 打赏
  • 举报
回复
哦,sorry,是<input type="text"...>

请问该如何写呢?
sw47 2003-09-02
  • 打赏
  • 举报
回复
<input style="text"...>?
<input type="text"...>?
<input class="text"...>?
zxuan 2003-09-02
  • 打赏
  • 举报
回复
是不是笔误?我觉得你意思是<input type="text"...>

61,125

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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