温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

dreamweaver中怎么使用DIV+CSS制作网站页面

发布时间:2022-12-01 17:48:40 阅读:123 作者:iii 栏目:编程语言
前端开发者测试专用服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>

本篇内容介绍了“dreamweaver中怎么使用DIV+CSS制作网站页面”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

HTML结构代码

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>我的家乡烟台海阳</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!----网站头部开始---->
<div class="top">
            <img src="images/logo.jpg">

         </div>
<div id="nav">
<ul>                            
<li><a href="index.html">网站首页</a></li>
<li><a href="about.html">家乡简介</a></li>
<li><a href="news.html">家乡新闻</a></li>
<li><a href="liuyan.html">在线留言</a></li>
<li><a href="jianjie.html">个人简介</a></li>
</ul>
</div>
<!-----网站头部结束-------------->
<!------网站主体部分开始----------------------->
<div class="main">
<div class="box">
   <img src="images/banner1.jpg">

</div>
<div class="nr">
<div class="tit-s">家乡简介</div>
<div class="box1">
<div class="box1-left"><img src="images/gr.jpg" /></div>
<div class="box1-right">
<P> 海阳市,隶属于山东省烟台市。位于山东半岛东南部,烟台市境南部,东邻乳山、牟平,西接莱阳,北连栖霞,南濒黄海,西南隔丁字湾与即墨相望。总面积1886.84平方千米。海阳市位于胶东半岛南端,因地处黄海之阳而得名。</P>
<P>2018年,海阳市下辖4个街道、10个镇,另设有3个工业区、1个旅游区 ,户籍人口为64.2643万人,实现地区生产总值(GDP)341.7亿元,其中,第一产业增加值77.1亿元,第二产业增加值125.3亿元,第三产业增加值139.3亿元。2019年11月,入选第二批节水型社会建设达标县(区)名单。</P>
<P>海阳市位于山东半岛南部,东邻乳山、牟平,西接莱阳,北连栖霞,南濒黄海,西南隔丁字湾与即墨相望。介于东经120°50′一121°29′,北纬36°16′一37°10′之间,总面积1886.84平方千米。市区距烟台市119千米,离济南市420千米,至北京市883千米。</P>
</div>

</div>
<div class="caiz">
<ul>
<li><img src="images/dg1.jpg"></li>
<li><img src="images/dg2.jpg"></li>
<li><img src="images/dg3.jpg"></li>
<li><img src="images/dg4.jpg"></li>
</ul>
</div>
<div class="bx2">
<div class="left">
<h2><a href="news.html">家乡新闻<span>更多》</span></a></h2>
<ul>
<li><a href="news01.html"><p>烟台海阳这个山村里, 有棵近500年历史的柘树</p><span>2019-12-16</span></a></li>
<li><a href="news02.html"><p>冬季逛烟台海阳徐家店大集, 虽然天冷但集上挺热闹</p><span>2019-12-11</span></a></li>
<li><a href="news01.html"><p>烟台海阳这个山村里, 有棵近500年历史的柘树</p><span>2019-12-16</span></a></li>
<li><a href="news02.html"><p>冬季逛烟台海阳徐家店大集, 虽然天冷但集上挺热闹</p><span>2019-12-11</span></a></li>
<li><a href="news01.html"><p>烟台海阳这个山村里, 有棵近500年历史的柘树</p><span>2019-12-16</span></a></li>
<li><a href="news02.html"><p>冬季逛烟台海阳徐家店大集, 虽然天冷但集上挺热闹</p><span>2019-12-11</span></a></li>
</ul>
</div>
<div class="right">
<img src="images/new.jpg">
</div>
</div>

</div>

</div>
<!------网站主体结束--------------------------->
<!------网站底部分开始----------------------->
<div class="foot">
<p></p>

<p>版权所有:我的家乡烟台海阳</p>

<p></p>

</div>
<!------网站底部体结束--------------------------->
</body>
</html>

CSS样式代码

@charset "utf-8";
/* CSS Document */
bodymargin:0 auto; font-size:14pxfont-family"微软雅黑"line-height:22pxbackground:#fbf6d9    }

div,p,input,ul,li,h2,h3,h4height:auto; margin:0;; padding:0vertical-align:middle ;}
lilist-style:none;}
atext-decoration:none; color:#000;}

/*---top开始-----*/
.topwidth1000pxheight100pxbackground:#FFFmargin:0 auto;}
.top img{margin-top10pxmargin-left20px;float: left;}
#navwidth:1000pxheight:50pxbackground:#bc7018margin:0 auto;}
#nav ulwidth:1000pxheight:50pxline-height:50pxfont-size:14px;  margin:0 auto;}
#nav ul liwidth200pxheight:50pxline-height:50pxcolor:#FFFfloat:lefttext-align:center;}
#nav li a {
    color:#FFF;
    font-family"微软雅黑";
    font-size:16px;
    margin-left2px;
    display: block;
    font-weight:bold;
}

.main{     width1000px;
    margin0 auto;
    height: auto;
    overflow: hidden;
}

/*---top结束-----*/
 .box {
    width1000px;
    height335px;

        }

.nr{width960px;
height: auto;
overflow: hidden;
background:
#FFF;
padding20px;
}
.tit-s {
    font-size16px;
    height40px;
    line-height40px;
     font-weight: bold;
    width940px;
    padding:0px 10px;
    border-bottom:#bc7018 1px solid;
}
.tit-s span afloat:rightfont-weight:normal; font-size:12px;color#FFF;}
.caizwidth:100%height: auto; overflow:hidden;}
.caiz ul{margin-top20px;
padding0px 10px;}
.caiz ul li
{
width225px;
height220px;
padding5px;
float: left;
    } 
.caiz ul li img{     
width225px;
height200px;
}

.box1width:960pxheight:260px;}
.box1-leftwidth:200pxheight:220pxpadding:20pxfloat:left;}    
.box1-rightwidth:700pxmargin-left:20pxheight:220pxfloat:left;margin-top20px;}
.box1-right-titfont-size16px;color#333;font-weight: bold; height:40pxline-height:40px;}
.box1-right pfont-size:14pxline-height:22pxtext-indent:2em;}
.bx2height:275pxmargin-bottom:15pxwidth:960px;border:#e8e8e6 1px solid;}
.bx2 .leftwidth:490pxheight:243pxpadding:15pxfloat:leftmargin-right:16px;}
.bx2 h2height:40pxline-height:40pxfont-size:20px;border-bottom:#bc7018 1px dashed; margin-bottom:10px;}
.bx2 h2 acolor:#bc7018;  }
.bx2 h2 spanfloat:rightfont-size:14pxfont-weight:normal; color:#333;}
.bx2 h3line-height:35pxfont-size:16px;}
.bx2 h3 spancolor:#F00;}
.bx2 h4font-size:12pxfont-weight:normal; line-height:20pxcolor:#666;}
.bx2 ul li{height32px;
backgroundurl(../images/ico.png) no-repeat 0px 12px;
line-height32px;
font-size14px;}
.bx2 ul li acolor:#000;}
.bx2 ul li p{width410px;float: left;}
.bx2 ul li p spanwidth:76pxfloat:left;}
.bx2 .rightwidth:388pxheight:243px;padding:15px;  float:right; }
.bx2 .right h2width:388pxheight:20pxbackground:#41628ffont-size:12pxline-height:20pxtext-align:center; color:#FFFfont-weight:normal;}

/*---foot开始-----*/
.foot{width1000px;
height:150px;
background:#bc7018;
margin0 auto;
padding-top20px;}
.foot pwidth:1000pxheight:30pxline-height:30px;color:#FFFmargin:0 auto ; text-align:center; }
/*---foot结束-----*/
.titile{
    width:225px;
    height:65px;
    background:url(../images/bg01.jpg) no-repeat;
    margin:0 auto;    
    margin-top20px;
    margin-bottom:20px;
    }
.titile h3line-height55px;
font-size34px;
font-weight: normal;
text-align: center;}    
.jies {
    width960px;
    margin0 auto;
    background:#FFF;
    padding:20px;
}

.jies img {
    float: left;
    margin15px;
}

.jies p {
    text-indent2em;
    line-height25px;
    font-size14px;
}

.newswidth:100%; }
.news ul li{  line-height:40pxheight:40pxborder-bottom:#CCC 1px dashed;  color:#3d2915;}
.news ul li afloat:left;  display:block; line-height:40pxheight:40pxbackground:url(../images/lvdian.jpg) left center no-repeat; color:#3d2915padding-left:20px; }
.news ul li a:hovercolor:#000;}
.news ul li spanfloat:rightcolor:#666line-height:40px;}

.conr {
    width960px;
    height:600px;
    overflow: hidden;
    border-top#ffffff 2px solid;
    margin0 auto;
    padding:20px;
    background:#FFF;
}

.conr img {
    width300px;
        margin10px;
    margin-bottom5px;
}

.conr p {
    line-height30px;
    text-indent2em
}

.shet {
    height: auto;
    min-height230px;
    margin-bottom20px;
    padding-bottom10px;
}

.shet h2 {
    height45px;
    line-height45px;
    font-size18px;
}

.mr {
    float: left;
    margin-right20px !important;
}


.nr {

    height: auto;
    overflow: hidden;
    background#FFF;
    padding-top20px;
    padding-bottom20px;
}
.title2 {
    height30px;
    line-height30px;
    font-size12px;
    text-align: center;
    color#999;
    font-weight: normal;
}

.title2 span {

    color#666 !important;
    font-weight: normal;
}
.neirong {
    width960px;
    height: auto;
    overflow: hidden;
    background#FFF;

}

.neirong p {
    text-indent2em
}

.neirong img {
    display: block;
    margin0 auto;
    margin-top10px;
    margin-bottom10px;
}

.ntitle {
    font-size16px;
    height80px;
    line-height40px;
    margin0 auto;
    text-align: center;
    color#333;
    margin-left20px;
    font-weight: bold;
    border-bottom#CCC 1px dashed;
    margin-bottom20px;
}

“dreamweaver中怎么使用DIV+CSS制作网站页面”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注亿速云网站,小编将为大家输出更多高质量的实用文章!

亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

原文链接:https://blog.51cto.com/u_15398742/5738076

AI

开发者交流群×