html+css 动态效果

1.波浪效果

<div class="sitesingle"></div>
<style>
    .sitesingle{
        display:flex;
        justify-content:space-between;
        align-items:stretch;
        overflow:hidden;
        position:relative;
        height: 400px;
    }
    @keyframes bgRotate{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@-webkit-keyframes switchColor{0%{background-position:0}50%{background-position:50%}to{background-position:100%}}@keyframes switchColor{0%{background-position:0}50%{background-position:50%}to{background-position:100%}}

    .sitesingle::before,.sitesingle::after{
        content: '';
        animation: bgRotate 30s linear infinite;
        position: absolute;
        left: 50%;
        top: 280px;
        width: 198vw;
        height: 211vw;
        margin-left: -153vh;
        transform-origin: 50% 49%;
        opacity: .05;
        border-radius: 43%;
        z-index: 0;
        animation-duration: 30s;
        background-color: #08f;
    }
    .sitesingle::after {
        border-radius: 45%;
        opacity:0.1;
    }
</style>

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是一个简单的HTML+CSS动态人物介绍网页代码示例: ```html <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>人物介绍网页</title> <style> /* 布局和字体样式 */ body { font-family: "微软雅黑", sans-serif; background-color: #f2f2f2; margin: 0; padding: 0; } header { background-color: #333; color: #fff; padding: 20px; text-align: center; } h1 { font-size: 36px; margin: 0; } main { display: flex; flex-wrap: wrap; justify-content: center; margin: 20px; } .card { background-color: #fff; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); display: flex; flex-direction: column; margin: 20px; padding: 20px; text-align: center; transition: transform 0.2s; width: 300px; } .card:hover { transform: scale(1.05); } .card img { border-radius: 50%; height: 200px; margin-bottom: 20px; width: 200px; } .card h2 { font-size: 24px; margin: 0; } .card p { font-size: 16px; margin: 10px 0; } .card button { background-color: #333; border: none; color: #fff; cursor: pointer; padding: 10px 20px; transition: background-color 0.2s; } .card button:hover { background-color: #666; } /* 动画效果 */ @keyframes slideInLeft { from { opacity: 0; transform: translateX(-100px); } to { opacity: 1; transform: translateX(0); } } .animation { animation: slideInLeft 1s; } </style> </head> <body> <header> <h1>人物介绍网页</h1> <p>一个简单的HTML+CSS动态人物介绍网页示例</p> </header> <main> <div class="card animation"> <img src="https://via.placeholder.com/200x200" alt="人物照片"> <h2>人物名称</h2> <p>人物介绍</p> <button>了解更多</button> </div> <div class="card animation"> <img src="https://via.placeholder.com/200x200" alt="人物照片"> <h2>人物名称</h2> <p>人物介绍</p> <button>了解更多</button> </div> <div class="card animation"> <img src="https://via.placeholder.com/200x200" alt="人物照片"> <h2>人物名称</h2> <p>人物介绍</p> <button>了解更多</button> </div> </main> </body> </html> ``` 这个示例网页包括一个头部、一个主体,以及三个人物介绍卡片。使用了HTML标签和CSS样式来创建和美化布局,以及CSS3的动画效果来添加动态效果。希望这个示例对您有所帮助。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值