可能的值
left :在左側(cè)不允許浮動元素
right :在右側(cè)不允許浮動元素
both :在左右兩側(cè)均不允許浮動元素
none:默認彼乌。允許浮動元素出現(xiàn)在兩側(cè)。
實例
<html>
<head>
<style type="text/css">
img
{float:left;}
</style>
<script type="text/javascript">
function clearLeft()
{
document.getElementById("p1").style.clear="left";
}
</script>
</head>
<body>
![](logocss.gif)
<p id="p1">This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.</p>
<input type="button" onclick="clearLeft()"
value="Clear left side of text" />
</body>
</html>