[英]Rounded Corners in HTML
我有这段代码,当它显示时,右侧有一条奇怪的垂直线。 我无法弄清楚可能是什么原因造成的。 任何帮助,将不胜感激。
这是我正在使用的完整代码。
<html>
<head></head>
<body>
<table border="0" width="600" align="center" cellpadding="0" cellspacing="0" title="Join us!">
<tr bgcolor="#8cc63f" style="line-height: 0px">
<td width="15"><img src="topleft.jpg" width="15" height="15" alt=""></td>
<td width="410" style="font-size: .2em"> </td>
<td width="15"><img src="righttop.jpg" width="15" height="15" alt=""></td>
</tr>
<tr bgcolor="#8cc63f">
<td width="15" style="font-size: 1px"> </td>
<td width="410" bgcolor="#8cc63f" align="center" style="color: white; font-size: 16px">
<span style="font-family: Verdana,Geneva,sans-serif; color:#FFFFFF;">
<a href="http://www.google.com"><br> We have spacious and modern training rooms. <br><br></span></td>
<td width="15" style="font-size: 1px;"> </td>
</tr>
<tr bgcolor="#8cc63f" style="line-height: 0px">
<td width="15" height="15"><img src="buttomleft.jpg" width="15" height="15" alt=""></td>
<td width="410" style="font-size: 0px;" height="15"></td>
<td width="15" height="15"><img src="buttomright.jpg" width="15" height="15" alt=""></td></tr>
</table>
</body>
</html>
您可能想看看合并 CSS3 圆角,而不必敲入一堆代码。 只需尝试谷歌搜索就可以了!
这是因为你的宽度关闭了。
改变:
<table border="0" width="600" align="center" cellpadding="0" cellspacing="0" title="Join us!">
至
<table border="0" width="430" align="center" cellpadding="0" cellspacing="0" title="Join us!">
工作示例(减去角落图形): http://jsfiddle.net/GuuLs/
如果您希望宽度为 600 像素,则需要将中间td
的宽度(当前为 410)修改为 570。
中间的单元格应该是 570 宽度,这将解决问题。 但是我不会以这种方式解决这个问题。 相反,我只会使用 css 将背景图像设置为top right, bottom right, top left, bottom left
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.