Maison  >  Article  >  interface Web  >  大家来看看我的这个代码为什么显示不出来框啊?_html/css_WEB-ITnose

大家来看看我的这个代码为什么显示不出来框啊?_html/css_WEB-ITnose

WBOY
WBOYoriginal
2016-06-24 12:13:541081parcourir

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Test</title><style type="text/css">.1{background-color:#F00;width:100px;height:100px;float:left}.2{background-color:#0F0;width:200px;height:200px;float:left}.3{background-color:#0F0;width:50px;height:50px;float:left;clear:left}</style></head><body><div class="1"></div><div class="2"></div><div class="3"></div></body></html>


回复讨论(解决方案)

你没有设置border当然不会显示框了.....................郁闷  还有问题站内信

我被楼主的问题难住了!

你没有设置border当然不会显示框了.....................郁闷  还有问题站内信

开始以为很简单,可是自己试了一下才知道,是因为class的值不能为数字,以前还没有注意过,学习。

引用 1 楼  的回复:

你没有设置border当然不会显示框了.....................郁闷  还有问题站内信


开始以为很简单,可是自己试了一下才知道,是因为class的值不能为数字,以前还没有注意过,学习。

哦这个命名规范就要求不能这样做啊。。。。。。。

Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn