簡體   English   中英

HTML 中的圓角

[英]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">&nbsp;</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">&nbsp;</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;">&nbsp;</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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM