html小案例

简介: html小案例

html简单菜单栏

<!DOCTYPE html>
<html lang="zh-CN">

<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>Document</title>
    <link rel="stylesheet" href="">
    <style>
        
        /* 简单菜单栏 */

        a {
            display: block;
            width: 230px;
            height: 40px;
            font-size: 16px;
            color: white;
            text-decoration: none;
            background-color: gray;
            text-indent: 2em;
            line-height: 40px;
        }

        a:hover {
            background-color: aqua;

        }

    </style>
</head>

<body>
    <a href="#">手机电脑</a>
    <a href="#">电视</a>
    <a href="#">笔记本</a>
    <a href="#">耳机</a>
    <a href="#">音响</a>
</body>

</html>

html轮播图布局

<!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>Document</title>
    <style>
        
        * {
            margin: 0;
            padding: 0;
        }
        .box1 {
            position: absolute;
            top: 300px;
            width: 200px;
            height: 200px;
            background-color: pink;
        }
        .box2 {
            display: none;
            position: relative;
            width: 600px;
            height: 300px;
            background-color: skyblue;
        }

        .tb_promo {
            position: relative;
            width: 520px;
            height: 280px;
            background-color: blueviolet;
            margin:  100px auto;
        }

        .tb_promo img {
            width: 520px;
            height: 280px;
        }

        
        
        .tb_promo .prev,
        .tb_promo .next {
            position: absolute;
            top: 50%;
            margin-top: -15px;
            width: 20px;
            height: 30px;
            line-height: 30px;
            text-align: center;
            background-color: rgba(0, 0, 0, .5);
            text-decoration: none;
            color: #fff;
        }

        .tb_promo .prev {
            left: 0;
            border-top-right-radius: 15px;
            border-bottom-right-radius: 15px;
        }
        
        .tb_promo .next {
            right: 0;
            border-top-left-radius: 15px;
            border-bottom-left-radius: 15px;
        }

        .tb_promo .pro_nav {
            position:absolute;
            left: 50%;
            bottom: 15px;
            margin-left: -35px;
            width: 70px;
            height: 13px;
            background: rgba(255, 255, 255, .3);
            border-radius: 7px;
        }

        .pro_nav li {
            float: left;
            list-style: none;
            width: 8px;
            height: 8px;
            background-color: #fff;
            margin: 3px;
            border-radius: 50%;
        }



    </style>
</head>
<body>
    <div class="box2">
        <div class="box1"></div>
    </div>

    <div class="tb_promo">
        <img src="1000.png" alt="">
        <a href="#" class="prev">&lt;</a>
        <a href="#" class="next">&gt;</a>
        <ul class="pro_nav">
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
        </ul>

    </div>
</body>
</html>

html小三角

<!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>Document</title>
    <style>
        .box {
            width: 0;
            height: 0;
            border: 50px solid transparent;
            border-left: 50px solid pink;
        }

        .sanjiao {
            position: relative;
            width: 200px;
            height: 200px;
            background-color: antiquewhite;
        }

        span {
            position: absolute;
            /* border-width的两倍; */
            top: -20px;  
            right: 15px;
            width: 0;
            height: 0;
            font-size: 0;
            line-height: 0;
            border: 10px solid transparent;
            border-bottom-color: red;
        }

    </style>
</head>
<body>
    <div class="box"></div>
    <div class="sanjiao">
        <span></span>
    </div>
</body>
</html>
相关文章
|
3月前
|
前端开发 Python
HTML笔记+案例(上)
HTML笔记+案例
45 0
|
9月前
|
容器
layui框架实战案例(23):在layui-tab-content中layui-progress-bar在html拼接中不显示lay-percent的解决方案
layui框架实战案例(23):在layui-tab-content中layui-progress-bar在html拼接中不显示lay-percent的解决方案
218 0
|
1月前
|
JavaScript
jQuery选择器案例之——index.html
jQuery选择器案例之——index.html
9 1
|
1月前
|
移动开发 HTML5
HTML5表格简单应用案例之[招聘需求表]
HTML5表格简单应用案例之[招聘需求表]
11 0
|
1月前
|
JavaScript 计算机视觉
纯js实现人脸识别眨眨眼张张嘴案例——index.html
纯js实现人脸识别眨眨眼张张嘴案例——index.html
16 0
|
2月前
|
移动开发 开发框架 Java
html一个案例学会所有常用HTML(H5)标签
html一个案例学会所有常用HTML(H5)标签
34 0
|
3月前
|
Shell PHP
php案例:截取sy.66969.cn/sh.html中的sh怎么做?
php案例:截取sy.66969.cn/sh.html中的sh怎么做?
php案例:截取sy.66969.cn/sh.html中的sh怎么做?
|
3月前
|
前端开发 Java PHP
HTML笔记+案例(下)
HTML笔记+案例
52 0
|
4月前
|
移动开发 JavaScript Windows
HTML 核心技术点基础详细解析以及综合小案例(2)
09-文本格式化标签 作用:为文本添加特殊格式,以突出重点。常见的文本格式:加粗、倾斜、下划线、删除线等
54 0
|
4月前
|
前端开发 JavaScript C++