一个大的难题~~~样式的难题~~~我发现想不出来解决方法
<!DOCTYPE html> <head> <style>#wrapper{width:800px;position:absolute;left:50%;margin-left: -400px;height:300px;border:1px solid red} </style> <body> <div id="wrapper"></div> </body></html>
<!doctype html><html><head><style>* {padding:0px;margin:0px;}body {background:#ccc;}#page {width:802px;margin-left:auto;margin-right:auto;margin-top:10px;}#wrapper1 {width:800px;height:300px;border:1px solid red;background:white;}#wrapper2 {width:800px;height:300px;border:1px solid blue;background:white;}</style></head><body><div id="page"><div id="wrapper1">div1</div><div id="wrapper2">div2</div></div></body></html>
[解决办法]
<!DOCTYPE html>
<head>
<style>
#wrapper{width:800px;margin-left:400px;height:300px;border:1px solid red;}
</style>
<body>
<div id="wrapper"></div>
<div id="wrapper">123</div>
</body>
</html>
给分 完美解决
[解决办法]
<!DOCTYPE html>
<head>
<style>
#wrapper{width:800px;position:absolute;left:50%;margin-left: -400px;height:300px;border:1px solid red;}
</style>
<body>
<div id="wrapper"></div>
<div style="width:800px;position:absolute;left:50%;margin-left: -400px;height:300px;border:1px solid red;top:310px">123</div>
</body>
</html>
[解决办法]
这样不行么???
<div style="width:800px;position:absolute;left:50%; top:200px; margin-left: -400px;height:300px;border:1px solid red">
assdf
<div style="position:absolute; left:0px; bottom:-100px; width:100px; height:100px; border:#0F0 1px solid;">1234</div>
</div>