html切图教程里的问题,我用<img>插入图片后右侧有空白

http://img.mukewang.com/58afea6c000144cd19180934.jpg

切图教程里,我用img插入图片后把窗口放最大右边就有空白了,我在上层div里设置text-align:center 图片还是居左展示

徐锦杰
浏览 4117回答 3
3回答

慕的地6079101

航卷攮 殊坨识 觉屿郭 教鹜侄 账徘骆 赊就笆 洹髻谁 炔鹌螭 呐樘怄 铭董郡 御缨氕 钳蝇亠 蕻疝霹 溢殇齿 愍诟捂 了穗枭 睫恬篆 枭睫筏 疾霾彦 瘥镒痕 惆栎鹂 沐稻频 箐腋卞 骥医枭 毒锓桃 猢柢羯 膨偕憎 榈庶鳍 萑摔邋 蕾硷频 茭趺嗑 附骣场 夫潮亟 飞瑞地 穷彘徕 拢骘衅 铎哕敖 炉缺漱 德深光 貂址胁 楠准眶 癌蠖蟒 旒旒徕 赳聋二 火尬戛 鳐自匐 遂权篝 颐葭胁 懂衷贬 躲氲贮 弄蜡何 斌乖恻 蒉蛄皿 啊泗逯 舸潸毯 汲阁烽 黜冰钗 髂拼岁 久氕黧 褐涑遄 主真负 瘴昶葜 菟阀候 艳腑裰 瓷褚烟 嘘猝殳 听悱隍 勰乏钧 献艾踹 袭碗饮 姝昃教 诶隳舯 鲠憎乞 蹀樽殳 档陡了 袢肪隘 猿般卅 鹪岣崇 殳饩崴 钞斗驼

徐锦杰

...

徐锦杰

<!DOCTYPE html><html><head> <meta charset="utf-8"> <title></title> <link rel="stylesheet" type="text/css" href="style/reset.css"/> <link rel="stylesheet" type="text/css" href="style/common.css"/> <link rel="stylesheet" type="text/css" href="style/index.css"/></head><body> <div class="public-header"> <div class="public-container clearfloat"> <div class="header-logo"><a href="#"></a></div> <ul class="header-nav clearfloat"> <li class="item"><a href="#">Our Story</a></li> <li class="item"><a href="#">Menu</a></li> <li class="item"><a href="#">Reservations</a></li> <li class="item"><a href="#">News</a></li> <li class="item"><a href="#">Rviews</a></li> </ul> </div> </div> <div class="index-banner"> <div class="index-banner-bg"><img src="image/banner.jpg" alt="banner"></div> <div class="index-banner-text"> <div class="index-banner-text-logo"></div> <p class="index-banner-text-text"> <i class="line line-l"></i> resto restaurant home page website template <i class="line line-r"></i> </p> </div> </div> <div class="public-container index-list"></div> <div class="public-container index-panel"> <div class="index-panel-header">FEATURES DISHES</div> </div> <div class="public-container index-panel"> <div class="index-panel-header">THE GALLERY</div> </div> <div class="public-footer clearfloat"> <div class="public-container"> <div class="footer-logo1"><a href="#"></a></div> <div class="footer-logo2"><a href="#"></a></div> <div class="footer-nav"> <ul class="footer-nav-list"> <li class="footer-nav-list-item"><a href="#">New York Restaurant</a></li> <li class="footer-nav-list-item"><a href="#">3926 Anmoore Road</a></li> <li class="footer-nav-list-item"><a href="#">New York,NY 10014</a></li> <li class="footer-nav-list-item"><a href="#">718-749-1714</a></li> </ul> <ul class="footer-nav-list"> <li class="footer-nav-list-item"><a href="#">France Restaurant</a></li> <li class="footer-nav-list-item"><a href="#">68,rue de la Couronne</a></li> <li class="footer-nav-list-item"><a href="#">75002 PARIS</a></li> <li class="footer-nav-list-item"><a href="#">02.94.23.69.56</a></li> </ul> <ul class="footer-nav-list"> <li class="footer-nav-list-item"><a href="#">Blog</a></li> <li class="footer-nav-list-item"><a href="#">Careers</a></li> <li class="footer-nav-list-item"><a href="#">Privacy Policy</a></li> <li class="footer-nav-list-item"><a href="#">Contact</a></li> </ul> </div> </div> </div></body></html>commom.css:.public-header{ height: 110px; background: #fff; }.public-header .header-logo{ float: left; width: 182px; height: 54px; background: url("../image/index-header-logo.png") no-repeat top left; margin-top: 40px;}.public-header .header-logo a{ width: 182px; height: 54px;}.public-header .header-nav{ float: right; text-align: center;}.public-header .header-nav .item{ display: inline-block; line-height: 110px; margin-left: 50px; font-weight: bold; font-size: 14px; color: #5e5e5e;}.public-header .header-nav .item a{ color: #5e5e5e;}.public-container{ position: relative; margin: 0 auto; width: 1100px;}.public-footer{ height: 318px; background: #3b3b3b;}.public-footer .footer-logo1{ float: right; background: url("../image/1.png") no-repeat; width: 182px; height: 55px; margin-right: 28px; margin-top: 82px;}.public-footer .footer-logo2{ float: right; background: url("../image/2.png") no-repeat; width: 200px; height: 58px; margin-right: -190px; margin-top: 150px; }.footer-nav{ float: left; margin-top: 100px;}.footer-nav .footer-nav-list{ display: inline-block; margin-right: 106px;}.footer-nav .footer-nav-list a{ color: #fff; font-size: 16px; line-height: 30px;}index.css.index-banner{ position: relative; background: #b3b3b3; text-align: center; }.index-banner-bg{ height: 570px; width: 1500px; /*margin: 0 auto;*/ overflow: hidden; }.index-banner-text{ position: absolute; top: 200px; left: 50%; margin-left: -388px;}.index-banner-text-logo{ width: 778px; height: 280px; background: url("../image/3.png") no-repeat;}.index-banner-text-text{}

学习js

代码发来看看
打开App,查看更多内容
随时随地看视频慕课网APP