网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 网站设计 > CSS, DIV, HTML
User Name
Password
 
FAQ Members List Calendar Cheap Glasses

Reply
 
Thread Tools Display Modes
  #1   IP: 112.84.243.230
Old 2014-05-03, 06:12 AM
Hadassah Hadassah is offline
初级会员
 
Join Date: 2007-04-08
Posts: 1
Hadassah 现在声名狼藉
Default div布局实现三列居中显示

<style type="text/css">
<!--
div {
position: relative;
width: 33%;
text-align: center;
float: left;
}
-->
</style>
把以上的样式表代码放在网页的<head></head>里面,然后在<body></body>部分放三个<div>就可以实现,可以在CSS里面修改div的样式.
<body>
<div>ghgkhk</div>
<div>khkg</div>
<div>ghgkhkg</div>
</body>

如果只是针对某个div,可以把样式的内容直接写在<div style="">属性里,如
<div style="width: 33%; text-align: center; float: left; position: relative;">AAA</div>
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 07:43 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.