html作品展示

代码如下:

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Document</title>

    <style>

        * {

            margin: 0;

            padding: 0;

        }

       

        .logo {

            width: 300px;

            margin: 100px auto 20px;

            display: block;

        }

       

        .input_box {

            width: 600px;

            margin: 0 auto;

            display: flex;

        }

       

        .input_box .input_main {

            flex: 1;

            position: relative;

        }

       

        .input_box .input_main input {

            width: 100%;

            padding: 10px;

            border: 2px solid rgb(197, 199, 205);

            border-right: none;

            border-radius: 6px 0 0 6px;

            box-sizing: border-box;

        }

       

        .input_box .input_main input:focus {

            outline: none;

            border: 2px solid rgb(92, 113, 234);

            border-right: none;

        }

       

        .input_box .input_main img {

            position: absolute;

            width: 20px;

            height: 20px;

            object-fit: cover;

            object-position: 0px -39px;

            right: 9px;

            top: 8px;

            cursor: pointer;

        }

       

        .input_box .input_main img:hover {

            object-position: 0px -59px;

        }

       

        .input_box>input {

            width: 100px;

            background: rgb(82, 100, 210);

            border: none;

            color: #fff;

            border-radius: 0 6px 6px 0;

            cursor: pointer;

        }

    </style>

</head>

<body>

    <img class="logo" src="2.png" alt="">

    <div class="input_box">

        <div class="input_main">

            <input type="text">

            <img src="1.png" alt="">

        </div>

        <input type="button" value="百度一下">

    </div>

</body>

</html>

代码如下:

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Document</title>

    <style>

       

        * {

            margin: 0;

            padding: 0;

        }

       

        body {

            height: 100vh;

            display: flex;

            justify-content: center;

            align-items: center;

            background: black;

        }

       

        .wcy {

            width: 300px;

            height: 300px;

            display: flex;

            flex-wrap: wrap;

        }

       

        .wcy div {

            width: 100px;

            height: 100px;

            background-image: url(1.jpg);

            border: 1px solid white;

            box-sizing: border-box;

            position: relative;

            transition: all 1s ease;

        }

       

        .wcy div:nth-child(3n+1) {

            background-position-x: 0px;

            left: -10px;

        }

       

        .wcy div:nth-child(3n+2) {

            background-position-x: -100px;

            left: 0px;

        }

       

        .wcy div:nth-child(3n+3) {

            background-position-x: -200px;

            left: 10px;

        }

       

        .wcy div:nth-child(-n+9) {

            top: 10px;

            background-position-y: -200px;

        }

       

        .wcy div:nth-child(-n+6) {

            top: 0px;

            background-position-y: -100px;

        }

       

        .wcy div:nth-child(-n+3) {

            top: -10px;

            background-position-y: 0px;

        }

       

        .wcy:hover div {

            top: 0;

            left: 0;

            border: none;

        }

       

        .wcy div:hover {

            transform: rotate(90deg);

        }

    </style>

</head>

<body>

    <div class="wcy">

        <div></div>

        <div></div>

        <div></div>

        <div></div>

        <div></div>

        <div></div>

        <div></div>

        <div></div>

        <div></div>

    </div>

</body>

</html>

代码如下:

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Document</title>

    <style>

       

        * {

            /* margin 页面空白 (外间距)*/

            margin: 0;

            /* padding 填料 (内间距)*/

            padding: 0;

        }

       

        .body {

            height: 100vh;

            /* display 展现   flex 弯曲 */

            display: flex;

            /* justify 使文本对齐  content  满足 */

            justify-content: center;

            /* align 使一致    item 项目 */

            align-items: center;

            background: linear-gradient(60deg, #12CBC4, #5758BB);

        }

       

        .box {

            font-size: 140px;

            font-weight: 700;

            color: #A3CB38;

            position: relative;

        }

       

        .box::before {

            content: "SHADOWN";

            color: #000;

            position: absolute;

            left: -35px;

            top: 28px;

            transform: skew(50deg) scaleY(0.5);

            z-index: -1;

            filter: blur(5px);

            /* 新增属性 蒙版效果 */

            -webkit-mask-image: linear-gradient(0deg, transparent, #000);

        }

    </style>

</head>

<body class="body">

    <div class="box">

        SHADOWN

    </div>

</body>

</html>

代码如下:

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Document</title>

    <style>

        * {

            margin: 0;

            padding: 0;

        }

       

        body {

            height: 100vh;

            display: flex;

            justify-content: center;

            align-items: center;

            /* 开启3d透视效果 */

            perspective: 1500px;

            background: black;

        }

       

        .wcy {

            width: 350px;

            height: 200px;

            /* 开启3d嵌套效果 */

            transform-style: preserve-3d;

            position: relative;

            cursor: pointer;

            animation: rotate 10s linear infinite;

        }

       

        .wcy :hover {

            animation-play-state: paused;

        }

       

        .wcy .item {

            width: 100%;

            height: 100%;

            position: absolute;

            -webkit-box-reflect: below 15px linear-gradient(transparent 10%, rgba(0, 0, 0, 0.3));

            transition: all 1s linear;

        }

       

        .wcy .item img {

            width: 100%;

            height: 100%;

            object-fit: cover;

        }

       

        .wcy .item:nth-child(1) {

            transform: translateZ(500px);

        }

       

        .wcy .item:nth-child(2) {

            transform: rotateY(60deg) translateZ(500px);

        }

       

        .wcy .item:nth-child(3) {

            transform: rotateY(120deg) translateZ(500px);

        }

       

        .wcy .item:nth-child(4) {

            transform: rotateY(180deg) translateZ(500px);

        }

       

        .wcy .item:nth-child(5) {

            transform: rotateY(240deg) translateZ(500px);

        }

       

        .wcy .item:nth-child(6) {

            transform: rotateY(300deg) translateZ(500px);

        }

       

        @keyframes rotate {

            from {

                transform: rotateX(0deg) rotateY(0deg);

            }

            to {

                transform: rotate(20deg) rotateY(360deg);

            }

        }

    </style>

</head>

<body>

    <div class="wcy">

        <div class="item">

            <img src="1.jpg" alt="">

        </div>

        <div class="item">

            <img src="2.jpg" alt="">

        </div>

        <div class="item">

            <img src="3.jpg" alt="">

        </div>

        <div class="item">

            <img src="4.jpg" alt="">

        </div>

        <div class="item">

            <img src="5.jpg" alt="">

        </div>

        <div class="item">

            <img src="6.jpg" alt="">

        </div>

    </div>

</body>

</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值