首页 > 网页制作 > Dreamweaver教程

dreamweaver 怎么在网页中使用div展示图片效果?

admin Dreamweaver教程 2022-02-06 21:54:31 dreamweaver   网页   图片   div"

在网页制作过程中,图片的布局直接影响到网页的整体效果,那么如何使图片布局整齐划一呢?其实使用div就可以做到,现在就自己制作的过程跟大家交流一下,同时分享制作的步骤和截图,希望对你有所帮助。

Adobe Dreamweaver CS5 简体中文绿色版

查看详情

1、启动dreamweaver cs5,执行文件-新建命令,在弹出的新建文档对话框选择html文件,点击创建按钮

2、在标签无标题文档中修改名称为div布局图片效果

3、在标签下方输入<style>相关的代码,</strong>定义网页的整体样式,样式直接影响着网页的美观程度。</p> <p align="center"><img alt="" src="https://www.iwyv.com/d/files/20220206/5ydadcawsq5.jpg" /></p> <p>4、接着在<strong><font color="#ff0000"><body>中输入div标签三个,</font></strong>并分别设置他们所属于的类,<strong><font color="#ff0000">最外边的div设置类为db,中间两个分别为zpxc1和zpxc,</font></strong>在下方就会看到基本的框架效果。</p> <p align="center"><img alt="" src="https://www.iwyv.com/d/files/20220206/j1bpzztffdt.jpg" /></p> <p>5、外部的框架设计好之后,接着设计使用div布局图片,书写相应的代码,设置div的尺寸大小和相关属性,同时设计图片的相关属性。</p> <p>代码为:</p> <p><strong>div.pt img{margin:0px; height:220px; width:120px; margin-top:10px; border: 1px solid #333;}</strong></p> <p><strong>div.pt{float:left; height:240px; width:140px; margin:6px; padding:0px; margin-top:10px; filter:light; background:#333; margin-left:0.8em;}</strong></p> <p><strong>.pic{ float:right;}</strong></p> <p align="center"><img alt="" src="https://www.iwyv.com/d/files/20220206/pqjtbnhvjng.jpg" /></p> <p>6、在类为zpxc1的div中建立新的四个<strong>div,并设置img的 src属性值,</strong>对图片进行正确的链接。</p> <p align="center"><img alt="" src="https://www.iwyv.com/d/files/20220206/peon4sk5nbq.jpg" /></p> <p>7、按f12进行在浏览器中进行预览效果,出现提醒信息<strong>“是否将改动保存到”,</strong>直接点击是,找一个合适的位置进行保存。</p> <p align="center"><img alt="" src="https://www.iwyv.com/d/files/20220206/2ohzng5arnc.jpg" /></p> <p align="center"><img alt="" src="https://www.iwyv.com/d/files/20220206/0npyfufmdtx.jpg" /></p> <p>8、接着在类为zpxc的div中输入“<strong>作品展示</strong>”四个字,再次才看效果,如果不合适可进行再次修改。</p> <p align="center"><img alt="" src="https://www.iwyv.com/d/files/20220206/oywvjv0o0qt.jpg" /></p> <p>9、如果图片过多,<strong>可以修改类zpxc1和db的高度</strong>,反复修改直至合适为止,重复步骤6、7采用同样的方法建立多个图片div。</p> <p align="center"><img alt="" src="https://www.iwyv.com/d/files/20220206/tuypprgz01d.jpg" /></p> <p>10、如果对“作品展示”四个字不满意的话,可以使用图片进行替换,达到满意为止,再次按f12进行在浏览器中进行查看效果,</p> <p align="center"><img alt="" src="https://www.iwyv.com/d/files/20220206/0hu3dytt2h4.jpg" /></p> <p>11、执行文件-另存为命令,在弹出的对话框中输入名称为<strong>“div布局图片</strong>”,找到一个合适的位置进行保存即可。</p> <p align="center"><img alt="" src="https://www.iwyv.com/d/files/20220206/0bre20cu5q1.jpg" /></p> <p><strong>相关推荐:</strong> </p> <p><a target="_blank" href="https://www.jb51.net/Dreamweaver/453680.html">dreamweaver中怎么将文字放到图片上?</a> </p> <p><a target="_blank" href="https://www.jb51.net/Dreamweaver/489382.html">怎么使用Dreamweaver给网站图片添加alt标签?</a> </p> <p><a target="_blank" href="https://www.jb51.net/Dreamweaver/504129.html">dreamweaver cs5怎么给网页制作图片的挤压效果?</a> </p> <span id="art_bot" class="jbTestPos"></span> </div> <div class="pagebar"> </div> <div class="pcd_ad"><script src=/d/js/acmsd/thea14.js></script></div> <div class="mbd_ad"> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-5850285417076520" data-ad-slot="9825815134" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <div class="rights"> <h5>版权声明</h5> <p>本文仅代表作者观点,不代表本站立场。<br> 本文系作者授权发表,未经许可,不得转载。<br>本文地址:/web/DW/78540.html</p> <div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_fbook" data-cmd="fbook" title="分享到Facebook"></a><a href="#" class="bds_twi" data-cmd="twi" title="分享到Twitter"></a><a href="#" class="bds_linkedin" data-cmd="linkedin" title="分享到linkedin"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_douban" data-cmd="douban" title="分享到豆瓣网"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a><a href="#" class="bds_evernotecn" data-cmd="evernotecn" title="分享到印象笔记"></a></div> <script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"1","bdSize":"24"},"share":{},"image":{"viewList":["fbook","twi","linkedin","qzone","tsina","douban","weixin","evernotecn"],"viewText":"分享到:","viewSize":"16"}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='/static/api/js/share.js?v=89860593.js?'];</script> </div> <div class="r-pn-post"> <div class="shang"><a title="dreamweaver怎么设置段落首行自动缩进两个字符?" href="/web/DW/78539.html" rel="bookmark" class="prev_p"><span>上一篇 :</span> dreamweaver怎么设置段落首行自动缩进两个字符? </a></div> <div class="xia"><a href="/web/DW/78541.html" rel="bookmark" class="next_p"><span>下一篇 :</span> 怎么使用Dreamweaver给网站图片添加alt标签?</a></div> <div class="clear"></div> </div> </div> <div class="related"> <h4>相关文章</h4> <ul> <li> <a href="/youxi/178076.html"> <div class="img"><img src="https://www.iwyv.com/d/files/20220723/nkzbzeelkgs.jpg" alt="《原神》海上绮梦录答案一览 2.8网页活动原石怎么获得 游戏攻略"></div> <p>《原神》海上绮梦录答案一览 2.8网页活动原石怎么获得 游戏攻略</p> </a> </li><li> <a href="/youxi/177513.html"> <div class="img"><img src="https://www.iwyv.com/d/files/20220708/b1v35hniocc.jpg" alt="《怪物猎人崛起》曙光日常高效刷图片手剑配装 游戏攻略"></div> <p>《怪物猎人崛起》曙光日常高效刷图片手剑配装 游戏攻略</p> </a> </li><li> <a href="/aigaoji/6799.html"> <div class="img"><img src="http://www.xitongzhijia.net/uploads/allimg/190904/66-1ZZ4102450564.jpg" alt="2020网页图片下载器哪个好用?网页图片保存下载推荐"></div> <p>2020网页图片下载器哪个好用?网页图片保存下载推荐</p> </a> </li><li> <a href="/jtjc/win10/2021-04-17/55046.html"> <div class="img"><img src="https://www.iwyv.com/d/files/20210417/ghqfe1wcfvr.jpg" alt="Win10网页兼容性怎么设置?Win10找不到兼容性设置"></div> <p>Win10网页兼容性怎么设置?Win10找不到兼容性设置</p> </a> </li><li> <a href="/jtjc/win10/138597.html"> <div class="img"><img src="https://img.jbzj.com/file_images/article/201501/2015010416030828.jpg" alt="Win8.1宽带连接后自动打开以Bing标识的网页怎么办"></div> <p>Win8.1宽带连接后自动打开以Bing标识的网页怎么办</p> </a> </li><li> <a href="/jtjc/win10/137311.html"> <div class="img"><img src="https://img.jbzj.com/file_images/article/201502/20150206162002358.jpg" alt="Win7怎么设置给图片文件自定义排序?"></div> <p>Win7怎么设置给图片文件自定义排序?</p> </a> </li><li> <a href="/jtjc/win10/136583.html"> <div class="img"><img src="https://img.jbzj.com/file_images/article/201503/201503071101253.jpg" alt="网友自制网页版windows93正式发布 附体验地址"></div> <p>网友自制网页版windows93正式发布 附体验地址</p> </a> </li><li> <a href="/jtjc/win10/134266.html"> <div class="img"><img src="https://img.jbzj.com/file_images/article/201504/201504100854287.png" alt="巧用Win8凭据管理器查看网页保存的账号密码方法图解"></div> <p>巧用Win8凭据管理器查看网页保存的账号密码方法图解</p> </a> </li> </ul> </div> <div class="post_comments"> <div id="comment"> <link href="/skin/ecmspl/css/pl.css" rel="stylesheet"> <div class="showpage" id="plpost"> <table width="100%" border="0" cellpadding="0" cellspacing="0" style="line-height: 25px; padding: 5px 3px 1px 8px; font-size: 18px;"> <tr><td><strong><font color="#333333">留言与评论(共有 <span id="infocommentnumarea">0</span> 条评论)</font></strong></td></tr> </table> <script> function CheckPl(obj) { if(obj.saytext.value=="") { alert("您没什么话要说吗?"); obj.saytext.focus(); return false; } return true; } </script> <form action="/e/pl/doaction.php" method="post" name="saypl" id="saypl" onsubmit="return CheckPl(document.saypl)"> <table width="100%" border="0" cellpadding="0" cellspacing="0" id="plpost"> <tr> <td> <table width="100%" border="0" cellspacing="10" cellpadding="0"> <tr> <td> <script src="/e/pl/loginjspl.php"></script> <textarea name="saytext" rows="6" id="saytext" placeholder="请遵守互联网相关规定,不要发布广告和违法内容!"></textarea> <script src="/d/js/js/plface.js"></script>    <table width='100%' align='left' cellpadding=3 cellspacing=1 bgcolor='#FFF'> <tr> <td width="80%" height="40" bgcolor="#FFFFFF">验证码:<input name="key" type="text" class="inputText" size="16" /> <img src="/e/ShowKey/?v=pl" align="absmiddle" name="plKeyImg" id="plKeyImg" onclick="plKeyImg.src='/e/ShowKey/?v=pl&t='+Math.random()" title="看不清楚,点击刷新" /> </td> <td width="20%" height="40" bgcolor="#FFFFFF"> <input name="sumbit" type="submit" value="提交评论" tabindex="6" style="border-radius: 5px;font-size: 16px;background: #e94c3d none repeat scroll 0% 0%;border: 0px none;margin: 0px 16px;padding: 1px 16px;height: 33px;line-height: 30px;color: rgb(255, 255, 255);opacity: 0.95;"> <input name="id" type="hidden" id="id" value="78540" /> <input name="classid" type="hidden" id="classid" value="62" /> <input name="enews" type="hidden" id="enews" value="AddPl" /> <input name="repid" type="hidden" id="repid" value="0" /> <input type="hidden" name="ecmsfrom" value="/web/DW/78540.html"> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table></form> <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td bgcolor="#FFFFFF" id="infocommentarea"></td> </tr> </table> <script src="/e/extend/infocomment/commentajax.php?classid=62&id=78540"></script> </div> </div> </div> <div class="pcd_ad"><script src=/d/js/acmsd/thea18.js></script></div> <div class="mbd_ad"> <!-- 手机广告位-评论底部广告位新 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-5850285417076520" data-ad-slot="9383780240" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <script type="text/javascript" src="//gg.iwyv.com/production/mh_g/i/static/wi_djn.js"></script> </div> </div> <!--@ mainl--> <div class="mainr"> <div class="widget widget_ad"> <script src=/d/js/acmsd/thea14.js></script> </div> <div class="widget widget_hotpost"> <h4>热门文章</h4> <ul> <li><i class="red">1</i><a href="/web/DW/78408.html" target="_blank">Dreamweaver怎么插入水平线并设置颜色?</a></li> <li><i class="red">2</i><a href="/web/DW/78985.html" target="_blank">Dreamweaver怎么创建框架结构? dw设置框架结构的教程</a></li> <li><i class="red">3</i><a href="/web/DW/79075.html" target="_blank">Dreamweaver怎么选中多个单元格?</a></li> <li><i>4</i><a href="/web/DW/78490.html" target="_blank">Dreamweaver怎么使用标签及代码设计表格?</a></li> <li><i>5</i><a href="/web/DW/78415.html" target="_blank">Dreamweaver页面怎么制作悬浮在固定位置的导航?</a></li> <li><i>6</i><a href="/web/DW/78739.html" target="_blank">在Dreamweaver中插入空格的方法介绍</a></li> <li><i>7</i><a href="/web/DW/78472.html" target="_blank">Dreamweaver网页怎么制作一个带有列表值的下拉菜单?</a></li> <li><i>8</i><a href="/web/DW/78498.html" target="_blank">Dreamweaver怎么避免中文乱码的问题?</a></li> <li><i>9</i><a href="/web/DW/78528.html" target="_blank">dreamweaver 8怎么通过代码设置页面高宽颜色?</a></li> <li><i>10</i><a href="/web/DW/78539.html" target="_blank">dreamweaver怎么设置段落首行自动缩进两个字符?</a></li> </ul> </div> <div class="widget widget_ad"> <script src=/d/js/acmsd/thea10.js></script> </div> <div class="widget widget_previous"> <h4>最近发表</h4> <ul> <li><a href="/ITzixun/178187.html">日本雷蛇官网实习生上错价了?游戏本只卖15950日元?</a></li> <li><a href="/youxi/175574.html">《原神》物归原主又归原主世界任务指南 游戏攻略</a></li> <li><a href="/youxi/175631.html">《原神》振晶的研究第三天试用角色2000分攻略 游戏攻略</a></li> <li><a href="/youxi/175559.html">《原神》2.6版全旋曜玉帛点位说明_蒙德 游戏攻略</a></li> <li><a href="/youxi/175547.html">《原神》2.6版深渊11-1守护镇石技巧 游戏攻略</a></li> <li><a href="/youxi/175604.html">《原神》神里绫华装备搭配推荐 游戏攻略</a></li> <li><a href="/youxi/175516.html">《原神》云堇突破材料获取方法 游戏攻略</a></li> <li><a href="/youxi/175494.html">《原神》世界任务他乡迷失客攻略 游戏攻略</a></li> <li><a href="/youxi/175497.html">《原神》神里绫华全面培养指南 神里绫华技能详解与出装建议 游戏攻略</a></li> <li><a href="/youxi/175460.html">《原神》神里绫人平民向大世界配队思路 游戏攻略</a></li> </ul> </div> <div class="widget widget_ad"> <script src=/d/js/acmsd/thea11.js></script> </div> <div class="widget widget_tags"> <h4>标签列表</h4> <ul> <li class="submenu"><a target="_blank" href="/e/tags/?tagname=%E5%BC%80%E6%94%BE%E4%B8%96%E7%95%8C">开放世界</a></li> <li class="submenu"><a target="_blank" href="/e/tags/?tagname=%E6%B2%99%E7%9B%92">沙盒</a></li> <li class="submenu"><a target="_blank" href="/e/tags/?tagname=win10">win10</a></li> <li class="submenu"><a target="_blank" href="/e/tags/?tagname=3D%E8%AE%BE%E8%AE%A1">3D设计</a></li> <li class="submenu"><a target="_blank" href="/e/tags/?tagname=PS">PS</a></li> <li class="submenu"><a target="_blank" href="/e/tags/?tagname=%E9%AC%BC%E8%B0%B7%E5%85%AB%E8%8D%92">鬼谷八荒</a></li> <li class="submenu"><a target="_blank" href="/e/tags/?tagname=win7">win7</a></li> <li class="submenu"><a target="_blank" href="/e/tags/?tagname=%E6%89%8B%E6%B8%B8">手游</a></li> <li class="submenu"><a target="_blank" href="/e/tags/?tagname=%E5%9B%A2%E9%98%9F%E7%AB%9E%E6%8A%80">团队竞技</a></li> <li class="submenu"><a target="_blank" href="/e/tags/?tagname=%E5%8E%9F%E7%A5%9E">原神</a></li> <li class="submenu"><a target="_blank" href="/e/tags/?tagname=%E4%BA%8C%E6%AC%A1%E5%85%83%E6%B8%B8%E6%88%8F">二次元游戏</a></li> <li class="submenu"><a target="_blank" href="/e/tags/?tagname=%E7%AD%96%E7%95%A5">策略</a></li> <li class="submenu"><a target="_blank" href="/e/tags/?tagname=%E7%94%B5%E8%84%91%E5%B8%B8%E8%AF%86">电脑常识</a></li> <li class="submenu"><a target="_blank" href="/e/tags/?tagname=%E7%8E%8B%E8%80%85%E8%8D%A3%E8%80%80">王者荣耀</a></li> <li class="submenu"><a target="_blank" href="/e/tags/?tagname=%E7%85%A7%E7%89%87%E5%A4%84%E7%90%86">照片处理</a></li> <li class="submenu"><a target="_blank" href="/e/tags/?tagname=MySQL">MySQL</a></li> <li class="submenu"><a target="_blank" href="/e/tags/?tagname=%E5%90%83%E9%B8%A1">吃鸡</a></li> <li class="submenu"><a target="_blank" href="/e/tags/?tagname=%E7%AC%94%E8%AE%B0%E6%9C%AC">笔记本</a></li> <li class="submenu"><a target="_blank" href="/e/tags/?tagname=%E7%BB%9D%E5%9C%B0%E6%B1%82%E7%94%9F%E5%A4%A7%E9%80%83%E6%9D%80">绝地求生大逃杀</a></li> <li class="submenu"><a target="_blank" href="/e/tags/?tagname=%E5%B0%84%E5%87%BB%E7%AB%9E%E4%BA%89">射击竞争</a></li> </ul> </div> <div class="widget widget_ad"> <script src=/d/js/acmsd/thea12.js></script> </div> </div> </div> </div> <script type="text/javascript"> // JavaScript Document function goTopEx(){ var obj=document.getElementById("goTopBtn"); function getScrollTop(){ return document.documentElement.scrollTop || document.body.scrollTop; } function setScrollTop(value){ if(document.documentElement.scrollTop){ document.documentElement.scrollTop=value; }else{ document.body.scrollTop=value; } } window.onscroll=function(){getScrollTop()>0?obj.style.display="":obj.style.display="none"; var h=document.body.scrollHeight - getScrollTop() - obj.offsetTop - obj.offsetHeight; obj.style.bottom=0+"px"; if(h<350){ obj.style.bottom=340+"px"; obj.style.top="auto"; } } obj.onclick=function(){ var goTop=setInterval(scrollMove,10); function scrollMove(){ setScrollTop(getScrollTop()/1.1); if(getScrollTop()<1)clearInterval(goTop); } } } </script> <!--向上 --> <div id="jz52top" > <span> <DIV style="DISPLAY: none" id="goTopBtn" ><a title="返回顶部" class="jz52topa" ><b>返回顶部</b></a></DIV> </span> <SCRIPT type=text/javascript>goTopEx();</SCRIPT> <span> <ul id="navmenu"> <li><a title="QR Code" class="jzqr" ><b>QR Code</b></a> <ul> <div id="jzqrn"> <img src="/skin/ecms172/images/weixin.png" width="228" height="228" /> <p>打开手机扫描上面的二维码</p> </div> </ul> </li> </ul> </span> </div> <!--向上完 --> <!-- 底部广告--> <!-- 底部广告--> <!--底部信息 --> <div class="ft_wp"> <div id="ft" class="wp cl ftddd" > <div class="ft_info" > <div class="ft_z1"> <p>潘少俊衡</p> <h3 class="ft_z_zdxx_zx"> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?1cc50873f5e983e8073d99a425b87921"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <span class="pipe"> | </span> 桂ICP备2023010378号-4 </h3> <h2 class="ft_z_zdxx_zx"> <p style="font-size:12px;">Powered By <a href="https://www.iwyv.com/" title="潘少俊衡" target="_blank">EmpireCMS</a> </p> </h2> </div> <div class="ft_z2"> </div> <div class="ft_z2"> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-XFMBHZNTEL"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-XFMBHZNTEL'); </script> <p><a target="_blank" href="https://www.iixiang.com/">爱享小站</a></p> <p><a target="_blank" href="https://www.sdzdyn.com/">中德益农</a></p> <p><a target="_blank" href="https://www.guujie.com">谷姐神农</a></p> <p><a target="_blank" href="https://huanyafeiliao.com/">环亚肥料</a></p> </div> <div class="ft_z2"> <p><a target="_blank" href="https://beian.miit.gov.cn/Integrated/index">桂ICP备2023010378号-4</a></p> <p><a href="https://beian.miit.gov.cn" title="桂公网备 45012202000125号" target="_blank">桂公网备 45012202000125号</a></p> </div> <div class="ft_z2"> <p><a target="_blank" href="https://www.iwyv.com/panshaoSEO/1277.html">联系我们</a></p> </div> <div class="ft_z2"> <p><a target="_blank" href="https://www.iwyv.com/panshaoSEO/1277.html">商业合作</a></p> <p><a target="_blank" href="https://www.iwyv.com/panshaoSEO/1277.html">广告投放</a></p> <p><a target="_blank" href="/tgxz/">投稿须知</a></p> </div> <div class="ft_bx"style="left:335px;"> </div> <div class="ft_bx ft_t1"> </div> <div class="ft_bx ft_t2"> </div> <div class="ft_bx ft_t3"> </div> <div class="ft_bx ft_t4"> </div> <div class="ft_z3"> <dd> <span><img src="/skin/ecms172/images/weixin.png" width="75" height="72.2" /></span> <p> <!-- 引用官方图标 --> <!-- 引用官方图标百度统计 --> </p> <p>使用手机软件扫描微信二维码</p> <p>关注我们可获取更多热点资讯</p> <p>感谢潘少俊衡友情技术支持</p> </dd> </div> </div> </div> </div> <div class="clear"></div> <!--底部信息完 --> <script src="/skin/ecms172/js/common.min.js" type="text/javascript"></script> <script></script> </body> </html>