【html-CSS布局】简单设计一个静态网页

html常用的标签属性:

* 注释:<!-- 注释内容 -->
        * <h1> to <h6>:标题标签
            * h1~h6:字体大小逐渐递减
        * <p>:段落标签
        * <br>:换行标签
        * <hr>:展示一条水平线
            * 属性:
                * color:颜色
                * width:宽度
                * size:高度
                * align:对其方式
                    * center:居中
                    * left:左对齐
                    * right:右对齐
        * <b>:字体加粗
        * <i>:字体斜体
        * <font>:字体标签
        * <center>:文本居中
            * 属性:
                * color:颜色
                * size:大小
                * face:字体

        * 属性定义:
            * color:
                1. 英文单词:red,green,blue
                2. rgb(值1,值2,值3):值的范围:0~255  如  rgb(0,0,255)
                3. #值1值2值3:值的范围:00~FF之间。如: #FF00FF
            * width:
                1. 数值:width='20' ,数值的单位,默认是 px(像素)
                2. 数值%:占比相对于父元素的比例

超链接:

* a:定义一个超链接
            * 属性:
                * href:指定访问资源的URL(统一资源定位符)
                * target:指定打开资源的方式
                    * _self:默认值,在当前页面打开
                    * _blank:在空白页面打开

<a href="http网址">文字</a>

表格标签:


        * table:定义表格
            * width:宽度
            * border:边框
            * cellpadding:定义内容和单元格的距离
            * cellspacing:定义单元格之间的距离。如果指定为0,则单元格的线会合为一条、
            * bgcolor:背景色
            * align:对齐方式
        * tr:定义行
            * bgcolor:背景色
            * align:对齐方式
        * td:定义单元格
            * colspan:合并列
            * rowspan:合并行
        * th:定义表头单元格
        * <caption>:表格标题
        * <thead>:表示表格的头部分
        * <tbody>:表示表格的体部分
        * <tfoot>:表示表格的脚部分

实战练习:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>魈魈快乐窝</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css" integrity="sha384-zCbKRCUGaJDkqS1kPbPd7TveP5iyJE0EjAuZQTgFLD2ylzuqKfdKlfG/eSrtxUkn" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-fQybjgWLrvvRgtW6bFlB7jaZrFsaBXjsOMm/tB9LTS58ONXgqbR9W8oWht/amnpF" crossorigin="anonymous"></script>
    <link rel="stylesheet" href="./style001.css">
</head>
<body>
<div class="gongjvlan">
    <span class="gongjvlan">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
    <span class="gongjvlan">所属国家-璃月</span>
    <span class="gongjvlan">种族</span>
    <span class="gongjvlan">降</span>
    <span class="gongjvlan">魔</span>
    <span class="gongjvlan">大</span>
    <span class="gongjvlan">圣</span>
    <span class="gongjvlan">,</span>
    <span class="gongjvlan"> &nbsp;&nbsp;&nbsp;&nbsp;</span>
    <span class="gongjvlan">护</span>
    <span class="gongjvlan">法</span>
    <span class="gongjvlan">夜</span>
    <span class="gongjvlan">叉</span>
    <span class="gongjvlan">听</span>
    <span class="gongjvlan">召</span>
    <span class="gongjvlan">而</span>
    <span class="gongjvlan">来</span>
    <span class="gongjvlan">!</span>
    <span class="gongjvlan">入</span>
    <span class="gongjvlan">阵。</span>
    <img src="折扇.png" style="width: 30px; height: 20px;text-align: center;position: relative;top: 5px;">



</div>
<div class="head">
    <a href="http://localhost:63342/javaWeb001/%E6%B3%A8%E5%86%8C.html?_ijt=bd71lntimccg70qqm5ninu95lt"><img src="三足鼎.png" style="width: 50px; height: 50px;text-align: center;position: relative;left: 110px;top: 15px;"></a>
    <span class="head" style="position: absolute;left: 400px;line-height: 100px;">少年英雄&nbsp;&nbsp;&nbsp;&nbsp;夜叉仙众&nbsp;&nbsp;&nbsp;&nbsp;且听风吟&nbsp;&nbsp;&nbsp;&nbsp;傩戏文化&nbsp;&nbsp;&nbsp;&nbsp;人设生平&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp</span>
    <span><form action="" style="position: absolute;right: 100px;">
        <input type="text" placeholder="请输入搜索内容" h><img src="搜索.png" style="width: 30px;height: 20px;text-align: center;position: relative;right: -2px;top: -2px;"></form></span>
<!--    <span class="head1"><img src="搜索.png" style="width: 40px;height: 40px;text-align: center;position: relative;right: -1px;top: 0px;"></span>-->
</div>
<div class="paimian">
    <div class="zhuti" style="display: inline-block;">
        <div class="xx"><img src=" 箭头1.png " style="width: 25px; height: 25px;position:relative;left: 60px; "></div>

        <div class="xx "><img src="箭头1.png " style="width: 25px; height: 25px;position:relative;left: 60px; "></div>

        <div class="xx"><img src=" 箭头1.png " style="width: 25px; height: 25px;position:relative;left: 60px;"></div>
        <div class="xx"><img src=" 箭头1.png " style="width: 25px; height: 25px;position:relative;left: 60px; "></div>
        <div class="xx "><img src="箭头1.png " style="width: 25px; height: 25px;position:relative;left: 60px;"></div>

        <div class="xx"><img src=" 箭头1.png " style="width: 25px; height: 25px;position:relative;left: 60px;"></div>

        <div class="xx "><img src="箭头1.png " style="width: 25px; height: 25px;position:relative;left: 60px;"></div>

        <div class="xx"><img src=" 箭头1.png " style="width: 25px; height: 25px;position:relative;left: 60px;"></div>

        <div class="xx"><img src=" 箭头1.png " style="width: 25px; height: 25px;position:relative;left: 60px;"></div>

        <div class="xx"><img src=" 箭头1.png " style="width: 25px; height: 25px;position:relative;left: 60px;"></div>



    </div>

    <span class="slide" style="display: inline-block;">

            <div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
  <ol class="carousel-indicators">
    <li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
    <li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
    <li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
  </ol>
  <div class="carousel-inner">
    <div class="carousel-item active">
      <img src="111.png" class="d-block w-100" alt="..." >
    </div>
    <div class="carousel-item">
      <img src="1657612800381.jpeg" class="d-block w-100" alt="..." >
    </div>
    <div class="carousel-item">
      <img src="2643CAB1AB3F92913F54237612049B3D27672313.jpg" class="d-block w-100" alt="...">
    </div>
  </div>
  <button class="carousel-control-prev" type="button" data-target="#carouselExampleIndicators" data-slide="prev">
    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
        <span class="sr-only">Previous</span>
        </button>
        <button class="carousel-control-next" type="button" data-target="#carouselExampleIndicators" data-slide="next">
    <span class="carousel-control-next-icon" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
  </button>
    </div>


    </span>
</div>
</div>




<div class="diyikuan ">
    <div class="yy">
        <div class="diyi ">
            <img src="青龙偃月刀.png " style="width: 50px; height: 50px; ">
            <div></div>
        </div>
        <div class="diyi "><img src="青龙偃月刀.png " style="width: 50px; height: 50px; ">
            <div></div>
        </div>
        <div class="diyi "><img src="青龙偃月刀.png " style="width: 50px; height: 50px; ">
            <div></div>
        </div>

        <div class="diyi "><img src="方孔钱.png " style="width: 50px; height: 50px; ">
            <div></div>
        </div>
        <div class="diyi "><img src="方孔钱.png" style="width: 50px; height: 50px; ">
            <div></div>
        </div>
        <div class="diyi "><img src="方孔钱.png " style="width: 50px; height: 50px; ">
            <div></div>
        </div>
        <div class="diyi "><img src="三足鼎.png " style="width: 50px; height: 50px; ">
            <div></div>


    </div>
        <div class="diyi "><img src="三足鼎.png " style="width: 50px; height: 50px; ">
            <div></div>

        </div>
        <div class="diyi "><img src="三足鼎.png " style="width: 50px; height: 50px; ">
            <div></div>


        </div>
    </div>
<div class="jj2">
    <img src="1.jpg " width="425px" height="200px">
    <img src="2.jpg " width="425px" height="200px">
    <img src="3.jpeg " width="425px" height="200px">
</div>


</div>
<div class="zhongxin ">
    <div class="ww "><img src="折扇.png " style="width: 60px; height: 60px; ">
    </div>
    <div class="ww "><img src="竹子.png " style="width: 60px; height: 60px; ">
    </div>
    <div class="ww "><img src="古风物件,中国风,中国结.png " style="width: 60px; height: 60px; ">
    </div>
    <div class="ww "><img src="古风伞.png " style="width: 60px; height: 60px; ">
    </div>
    <div class="ww "><img src="竹简.png " style="width: 60px; height: 60px; ">
    </div>
</div>

<div class="jj1">
    <img src="1.jpg" style="width: 100px; height: 72px;text-align: center;position: absolute;left: 10px;top: 5px; ">
    <img src="2.jpg" style="width: 100px; height: 72px;text-align: center;position: absolute;left: 200px;top: 5px; ">
    <img src="3.jpeg" style="width:100px; height: 72px;text-align: center;position: absolute;left: 390px;top: 5px; ">
    <img src="4.jpeg" style="width: 100px; height: 72px;text-align: center;position: absolute;left: 580px;top: 5px; ">
    <p>
        <img src="5.jpeg" style="width: 100px; height: 72px;text-align: center;position: absolute;left: 10px;top: 80px; ">
        <img src="6.jpeg" style="width: 100px; height: 72px;text-align: center;position: absolute;left: 200px;top: 80px; ">
        <img src="魈哥.jpg" style="width: 100px; height: 72px;text-align: center;position: absolute;left: 390px;top: 80px; ">
        <img src="8.jpg" style="width: 100px; height: 72px;text-align: center;position: absolute;left: 580px;top: 80px; ">
    </p>
</div>
<div class="zhongxin1">
    <div class="ww "><img src="方天画戟.png " style="width: 60px; height: 60px; ">
    </div>
    <div class="ww "><img src="鼓.png " style="width: 60px; height: 60px; ">
    </div>
    <div class="ww "><img src="中国风,埙.png " style="width: 60px; height: 60px; ">
    </div>
    <div class="ww "><img src="方天画戟.png " style="width: 60px; height: 60px; ">
    </div>
    <div class="ww "><img src="琵琶-01.png " style="width: 100px; height: 100px; ">
    </div>
</div>
</body>
</html>

#carouselExampleIndicators {
    width: 1000px;
    height: 900px;
    float: left;
    position: absolute;
    left: 337px;
    top: 130px;
}

.gongjvlan {
    width: 1500px;
    height: 30px;
    background: #05414f;
    border: 1px solid #05414f;
    line-height: 30px;
    text-align: left;
    font-size: 13px;
    color: antiquewhite;
    overflow: hidden;
}

.head {
    width: 1500px;
    height: 100px;
    float: left;
    background: antiquewhite;
}

.head1 {
    width: 30px;
    height: 20px;
    text-align: center;
    position: relative;
    right: -2px;
    top: -2px;
}

.head1:hover {
    opacity: 1;
}

.zhuti {
    width: 200px;
    height: 700px;
    background: #044758;
    border: 10px solid #044758;
    text-align: center;
    font-size: 15px;
    color: lightgoldenrodyellow;
    float: left;
    position: relative;
    left: 110px;
}

.paimian {
    width: 1500px;
    height: 700px;
    float: left;
}

.diyikuan {
    width: 1500px;
    height: 200px;
    float: left;
    position: absolute;
    left: 110px;
    top: 880px;
    border: 1px solid bisque;
}

.yy {
    width: 210px;
    height: 200px;
    float: left;
    background-color: cadetblue;
}

.jj {
    width: 1000px;
    height: 200px;
    opacity: 1;
    position: absolute;
    left: 337px;
    top: 148px;
}

.jj1 {
    width: 1028px;
    height: 200px;
    position: absolute;
    left: 190px;
    top: -750px;
    background: #faf7f1;
    opacity: 0;
}
.jj2 {
    width: 1290px;
    height: 200px;
    position: absolute;
    left: 220px;
    background: #faf7f1;
    opacity: 1;
}
.diyikuan.jj2 img{
    width: 100%;
    height: 100%;
    position: static;

}

.jj1:hover {
    opacity: 1;
}

.diyi {
    width: 70px;
    height: 70px;
    float: left;
    text-align: center;
    font-size: 10px;
    color: lightgoldenrodyellow;
}

.zhongxin {
    width: 100px;
    height: 500px;
    float: right;
    border: 5px solid rgb(233, 232, 232);
    position: fixed;
    right: 50px;
    top: 200px;
    text-align: end;
    background: rgb(233, 232, 232);
}

.zhongxin1 {
    width: 100px;
    height: 500px;
    float: right;
    border: 5px solid rgb(233, 232, 232);
    position: fixed;
    right: 50px;
    top: 200px;
    text-align: end;
    background: rgb(233, 232, 232);
    opacity: 0;
    color: seagreen;
}

.zhongxin1:hover {
    opacity: 1;
}

.ww {
    width: 100px;
    height: 100px;
    float: right;
    text-align: center;
}

.xx {
    width: 160px;
    height: 70px;
    float: left;
    text-align: left;
    color: white;
    font-size: 20px;
    position: relative;
    left: 10px;
    border: 0px solid rgb(161, 159, 159);
    line-height: 70px;
}

.slide {
    width: 800px;
    height: 800px;
}
.carousel-inner{
    width: 1350px;
    height: 700px;
    right: 15px;
}
.carousel-inner .carousel-item{
    width: 100%;
    height: 100%;
}
.carousel-inner .carousel-item img{
    width: 100%;
    height: 100%;
    margin-top: 10px;

}

  • 3
    点赞
  • 26
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值