当前位置: 代码迷 >> HTML/CSS >> html 相关有关问题
  详细解决方案

html 相关有关问题

热度:265   发布时间:2012-10-08 19:54:56.0
html 相关问题

?

w3school Web 技术教程

http://www.w3school.com.cn/

?

一、HTML td 自动换行命令

HTML td 自动换行命令

<td colspan="2" style="word-break:break-all"><font color="#FF0000"><xsl:value-of select="root/lang/body/nightModeText" /></font></td>
?

上面的程序nightModeText是一段英文 我添加style="word-break:break-all之后在IE6/7上都可以显示自动换行,IE8却显示不了 怎么兼容IE8,用什么命令?

?

给长地址的单元格应用样式:
word-wrap: break-word;word-break:break-all;

?

?

二、HTML br 的 clear 属性

??? 通常情况下,<br> 标签会告诉浏览器立即停止当前的文本流,并在下一行的左边,或者在左对齐的内联图形或表格的右边开始继续输出文本流。

??? 但是有时候,您也许希望当前的文本流在当前左边或右边的内联表格或图像的下面一行继续输出。

???? HTML 4 和 XHTML 通过 <br> 标签提供了这样的功能。它可以具有三个值:left、right 或者 all,每个值都代表一个边界或两边的边界。当指定的边界没有图像时,浏览器才会继续输出文本。

提示和注释

提示:一般情况下,文本流中的其他行会在内联图像的底部显示,除非图形的 <img> 标签被设置为左对齐或右对齐(对于 <table> 标签也一样)。因此,<br> 标签的 clear 属性只对这些左对齐或右对齐的图像或表格起作用。

?

参照 http://www.w3school.com.cn/tags/tag_br_prop_clear.asp

?

例子:

http://www.ncku.edu.tw/~iteach/chia/cnc_course/dw4/dw4-2/br-clear.htm

?

<html>
<head>
<title>Example of &lt;br clear&gt;</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
    <p>
        National Cheng Kung University, Computer and Network Center.
        National Cheng Kung University, Computer and Network Center. <img
            src="img/blueball.gif" width="30" height="30" align="left"><img
            src="img/cnc-for-repeat.gif" width="90" height="60"
            align="right"><font color="#6699CC"><b>&lt;br
                clear=left&gt;</b></font><br clear=left> National Cheng Kung
        University, Computer and Network Center. National Cheng Kung
        University, Computer and Network Center. National Cheng Kung
        University, Computer and Network Center. National Cheng Kung
        University, Computer and Network Center. National Cheng Kung
        University, Computer and Network Center. National Cheng Kung
        University, Computer and Network Center.
    </p>
    <p>
        National Cheng Kung University, Computer and Network Center.
        National Cheng Kung University, Computer and Network Center. <img
            src="img/cnc-for-repeat.gif" width="90" height="60"
            align="left"><font color="#6699CC"><b><img
                src="img/blueball.gif" width="30" height="30"
                align="right">&lt;br clear=right&gt;<br
                clear=right> </b></font>National Cheng Kung University,
        Computer and Network Center. National Cheng Kung University,
        Computer and Network Center. National Cheng Kung University,
        Computer and Network Center. National Cheng Kung University,
        Computer and Network Center. National Cheng Kung University,
        Computer and Network Center. National Cheng Kung University,
        Computer and Network Center.
    </p>
    <p>
        National Cheng Kung University, Computer and Network Center.
        National Cheng Kung University, Computer and Network Center. <img
            src="img/cnc-for-repeat.gif" width="90" height="40"
            align="left"><font color="#6699CC"><b><img
                src="img/blueball.gif" width="60" height="60"
                align="right">&lt;br clear=all&gt;<br clear=all>
        </b></font>National Cheng Kung University, Computer and Network Center.
        National Cheng Kung University, Computer and Network Center.
        National Cheng Kung University, Computer and Network Center.
        National Cheng Kung University, Computer and Network Center.
        National Cheng Kung University, Computer and Network Center.
        National Cheng Kung University, Computer and Network Center.
    </p>
</body>
</html>
?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

  相关解决方案