Home  >  Article  >  Web Front-end  >  Let's take a look at why my code doesn't display the box? _html/css_WEB-ITnose

Let's take a look at why my code doesn't display the box? _html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:13:541120browse

<!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>


Reply to discussion (solution)

Of course the box will not be displayed if you don’t set the border... ............Depressed There are still questions. In-site message

I am stumped by the poster’s question!

Of course the frame won’t be displayed if you don’t set the border.......................Depressing There are still problems. In-site message

Start I thought it was very simple, but after trying it myself, I realized that it was because the value of class cannot be a number. I had never paid attention to it before, so I learned.

Quote from the 1st floor’s reply:

Of course you won’t display the frame if you don’t set the border............. Depressing There are still questions. In-site messages


I thought it was very simple at first, but after trying it myself, I realized that it is because the value of class cannot be a number. I haven't paid attention to it before. Study.

Oh, this naming convention requires that you cannot do this. . . . . . .

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn