css小页面

浅浅玩一下吧,html+css,这里面主要是css,因为html标签都很简单,先看看效果图吧,其实这两张图是连接在一起的
在这里插入图片描述
在这里插入图片描述
其实这里面最主要的还是css样式,这里面我主要用了类选择符,然后div盒子嵌套,偷懒偷懒,先就这样吧🤣🤣
完整代码如下:
头部标签中的除了style标签是自己写的,其他标签都是自带的,而这个是个内联的css样式,里面用到了css中的类选择符(在英文名字前有一个小点)和普通的选择符(h1和div),剩下的都是css属性,css属性还是很重要的,但我感觉这就和背单词差不多

属性释义
text-align文本对齐格式
font-size字体大小
font-family字体
color字体颜色
background-color背景颜色
padding行内间距
margin外边距
width
height
border边框大小
border-style边距类型
float浮动

关于这个float浮动,这个其实就是像气球一样,漂浮在页面内,给他设置一个盒子,可以让他在盒子里往左飘或者是往右飘,漂浮在盒子的最上面

<!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>
    <style>
        h1{
            text-align: center;
            font-size: 2em;
            font-family: 楷体;
            color: grey;
            padding: 100px 20px 20px 20px;
        }
        div{
            background-color: aquamarine;
            width: 300px;
            height: 300px;
            padding: 20px 20px 20px 20px;
            border: 2em solid antiquewhite;
            border-style: double;
            margin: 0px auto;
        }
        .one{
            background-color:lightpink;
            width: 300px;
            height: 300px;
            border-style: dashed;
        }
        .two{
            background-color: lightsteelblue;
            width: 300px;
            height: 300px;
            border-style: groove;
        }
        .d{
            background-color: aquamarine;
            width: 300px;
            height: 300px;
            padding: 20px 20px 20px 20px;
            border: 2em solid antiquewhite;
            border-style: double;
            float: right;
        }
        .o{
            background-color:lightpink;
            width: 300px;
            height: 300px;
            border-style: dashed;
            float: right;
        }
        .t{
            background-color: lightsteelblue;
            width: 300px;
            height: 300px;
            border-style: groove;
            float: right;
        }
    </style>
</head>
<body bgcolor="bluck">
    <div>
        <div class="one">
            <div class="two">
                <div>
                    <div class="one">
                        <div class="two">
                            <div>
                                <div class="one">
                                    <div class="two">
                                        <h1>biu</h1>
                                        <div class="d">
                                            <div class="o">
                                                <div class="t">
                                                    <div class="d">
                                                        <div class="o">
                                                            <div class="t">
                                                                <div class="d">
                                                                    <div class="o">
                                                                        <div class="t">
                                                                            <h1>biu</h1>
                                                                        </div>
                                                                    </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值