<!DOCTYPE html> <html> <head> <title></title> <style type="text/css"> div{ width:600px; height:300px; border:1px solid red; float:left; } </style> </head> <body> <div></div> <div></div> </body> </html>
越努力越幸运!!!
I have written a piece of code, but the floating effect is not there, what is the situation? - PHP Chinese website Q&A - I have written a piece of code, but the floating effect is not there, what is the situation? - PHP Chinese website Q&A
Take a look around, Study it.
可以把"folat:left"属性删除掉,就可以实现图中的效果了,也可以在两个<div>之间加点内容,看起来效果更明显。
可能是是浏览器的宽度不够,你可以吧浏览器最大化,然后在试一下!
I have written a piece of code, but the floating effect is not there, what is the situation? - PHP Chinese website Q&A - I have written a piece of code, but the floating effect is not there, what is the situation? - PHP Chinese website Q&A
Take a look around, Study it.
可以把"folat:left"属性删除掉,就可以实现图中的效果了,也可以在两个<div>之间加点内容,看起来效果更明显。
可能是是浏览器的宽度不够,你可以吧浏览器最大化,然后在试一下!