DIVCSS中为什么背景颜色无法显示

作者:朋克周 | 创建时间: 2023-04-29
DIVCSS中为什么背景颜色无法显示

操作方法

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh" lang="zh"> <head profile="http://www.w3.org/2000/08/w3c-synd/#"> <meta http-equiv="content-language" content="zh-cn" /> <meta http-equiv="content-type" content="text/html;charset=gb2312" /> <title>blueidea</title> <style type="text/css"> /*<![CDATA[*/ ul {  background:red  } li {  float:left;  width:180px;  } /*]]>*/ </style> </head> <body> <ul> <li>web标准常见问题大全</li> <li>web标准常见问题大全</li> <li>web标准常见问题大全</li> <li>web标准常见问题大全</li> <li>web标准常见问题大全</li> <div style="clear:both"></div> </ul> </body> </html>IE中设置有背景色的ul并没有显示出来,这个属于haslayout问题,解决的办法也很多参考

点击展开全文

更多推荐