Maison > Article > interface Web > 初学css,怎么能获得这样的效果,调试了半天,都不行,请高人指点下!_html/css_WEB-ITnose
<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>Basic Tabs - jQuery EasyUI Demo</title> <style type="text/css">.divtop{ padding: 10px; background: black;}.divquery{ background: blue; height:200px; float:left;}.divbtn{ float:left; width:120px; background: red; height:200px;}.qitem { display:inline-block; line-height:30px; text-align:right; width:250px; height:25px; overflow:hidden; background: green;}</style></head><body> <div class="divtop"> <div class="divquery"> <span class="qitem"> </span> <span class="qitem"> </span> <span class="qitem"> </span> <span class="qitem"> </span> <span class="qitem"> </span> </div> <div class="divbtn"> </div> </div></body></html>
红色div float:right
红色div float:right
<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>Basic Tabs - jQuery EasyUI Demo</title> <style type="text/css">.divtop{ padding: 10px; background: black;}.divquery{ background: blue; height:200px; float:left; width:80%}.divbtn{ float:left; width:20%; background: red; height:200px;}.qitem { display:block; line-height:30px; text-align:right; width:15%; float:left; height:25px; overflow:hidden; background: green; margin:0.4rem;}</style></head><body> <div class="divtop"> <div class="divquery"> <span class="qitem"> </span> <span class="qitem"> </span> <span class="qitem"> </span> <span class="qitem"> </span> <span class="qitem"> </span> <span class="qitem"> </span> <span class="qitem"> </span> </div> <div class="divbtn"> </div> </div></body></html>
<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>Basic Tabs - jQuery EasyUI Demo</title> <style type="text/css">.divtop{ padding: 10px; background: black;}.divquery{ background: blue; height:200px; float:left; width:80%}.divbtn{ float:left; width:20%; background: red; height:200px;}.qitem { display:block; line-height:30px; text-align:right; width:15%; float:left; height:25px; overflow:hidden; background: green; margin:0.4rem;}</style></head><body> <div class="divtop"> <div class="divquery"> <span class="qitem"> </span> <span class="qitem"> </span> <span class="qitem"> </span> <span class="qitem"> </span> <span class="qitem"> </span> <span class="qitem"> </span> <span class="qitem"> </span> </div> <div class="divbtn"> </div> </div></body></html>
<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>Basic Tabs - jQuery EasyUI Demo</title> <style type="text/css">.divtop{ padding: 10px; padding-right:130px; background: black; overflow:hidden; position:relative;}.divquery{ background: blue; height:200px; float:left;}.divbtn{ float:left; width:120px; background: red; height:200px; right:10px; position:absolute;}.qitem { display:inline-block; line-height:30px; text-align:right; width:250px; height:25px; overflow:hidden; background: green;} </style> </head><body> <div class="divtop"> <div class="divquery"> <span class="qitem"> </span> <span class="qitem"> </span> <span class="qitem"> </span> <span class="qitem"> </span> <span class="qitem"> </span> </div> <div class="divbtn"> </div> </div> </body></html>给分吧。。