用纯css实现的html5 logo标志

46 篇文章 0 订阅
19 篇文章 1 订阅


   一个用css实现的html5  Logo,主要用html和css技术实现,例子如下:

源代码下载地址:

css部分代码如下:


<style type="text/css">
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-weight: inherit;
    font-style: inherit;
    font-size: 100%;
    font-family: inherit;
    vertical-align: baseline;
}
blockquote:before, blockquote:after, q:before, q:after {
    content: "";
}
blockquote, q {
    quotes: "" "";
}
body {
    line-height: 1;
    color: black;
    background: white;
}
caption, th, td {
    text-align: left;
    font-weight: normal;
}
:focus {
    outline: 0;
}
table {
    border-collapse: separate;
    border-spacing: 0;
}
ol, ul {
    list-style: none;
}
a {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    margin: 40px auto 0;
    display: block;
    width: 120px;
    text-align: center;
}
.html5 {
    width:345px;
    height:385px;
    display:block;
    margin:100px auto 0;
    position:relative;
}
.html5 .icon .text .left {
    display:block;
    position:absolute;
    width:182px;
    height:400px;
}
.html5 .icon .text .left .left {
    display:block;
    position:absolute;
    width:40px;
    height:130px;
    background:#ebebeb;
    top:72px;
    left:82px;
    -webkit-transform:skew(5deg);
    -moz-transform:skew(5deg);
}
.html5 .icon .text .left .top {
    display:block;
    position:absolute;
    width:104px;
    height:40px;
    background:#ebebeb;
    top:72px;
    left:80px;
}
.html5 .icon .text .left .middle {
    display:block;
    position:absolute;
    width:96px;
    height:40px;
    background:#ebebeb;
    top:162px;
    left:88px;
}
.html5 .icon .text .left .bottom {
    display:block;
    position:absolute;
    width:85px;
    height:40px;
    background:#ebebeb;
    top:261px;
    left:102px;
-webkit-transform::rotate(12deg);
    -moz-transform:rotate(12deg);
}
.html5 .icon .text .left .vert {
    display:block;
    position:absolute;
    width:40px;
    height:70px;
    background:#ebebeb;
    top:222px;
    left:95px;
    -webkit-transform:skew(5deg);
    -moz-transform:skew(5deg);
}
.html5 .icon .text .right {
    height:400px;
    width:150px;
    left:182px;
    display:block;
    position:absolute;
    overflow:hidden;
}
.html5 .icon .text .right .top {
    display:block;
    position:absolute;
    width:105px;
    height:40px;
    background:#fff;
    top:72px;
    left:-3px;
    -webkit-transform:skew(-5deg);
    -moz-transform:skew(-5deg);
}
.html5 .icon .text .right .middle {
    display:block;
    position:absolute;
    width:80px;
    height:40px;
    background:#fff;
    top:162px;
}
.html5 .icon .text .right .right {
    display: block;
    position: absolute;
    width: 40px;
    height: 130px;
    background: #ffffff;
    top: 162px;
    left: 50px;
    -webkit-transform: skew(-5deg);
    -moz-transform: skew(-5deg);
}
.html5 .icon .text .right .bottom {
    display: block;
    position: absolute;
    width: 85px;
    height: 40px;
    background: #ffffff;
    top: 261px;
    left: -5px;
    -webkit-transform: rotate(-12deg);
    -moz-transform: rotate(-12deg);
}
.html5 .icon .overlay {
    height: 400px;
    width: 150px;
    left: 182px;
    position: absolute;
    display: block;
    overflow: hidden;
}
.html5 .icon .overlay .top {
    width: 160px;
    height: 300px;
    top: 28px;
    left: -35px;
    display: block;
    background: #f0652a;
    position: absolute;
    -webkit-transform: skew(-5deg);
    -moz-transform: skew(-5deg);
}
.html5 .icon .overlay .bottom {
    position:absolute;
    top:328px;
    left:-180px;
    display:block;
    border-color:#f0652a transparent transparent;
    border-style:solid;
    border-width:35px 140px 0;
    height:0px;
    margin:0 10px;
    width:0;
    font-size:0;
    line-height:0;
}
.html5 .icon .bg .middle {
    position:absolute;
    left:132px;
    background:#e44c27;
    width:50px;
    height:355px;
    display:block;
}
.html5 .icon .bg .right {
    position:absolute;
    left:166px;
    background:#e44c27;
    width:170px;
    height:350px;
    display:block;
    -webkit-transform:skew(-5deg);
    -moz-transform:skew(-5deg);
}
.html5 .icon .bg .left {
    position:absolute;
    left:24px;
    background:#e44c27;
    width:170px;
    height:350px;
    -webkit-transform:skew(5deg);
    -moz-transform:skew(5deg);
}
.html5 .icon .bg .bottom {
    position:absolute;
    top:350px;
    left:30px;
    display:block;
    border-color:#e44c27 transparent transparent;
    border-style:solid;
    border-width:35px 140px 0;
    height:0px;
    margin:0px 10px;
    width:0;
    font-size:0;
    line-height:0;
}
</style>


html代码如下

<div class="html5">
  <div class="icon">
    <div class="bg">
      <div class="right"></div>
      <div class="left"></div>
      <div class="bottom"></div>
      <div class="middle"></div>
    </div>
    <div class="overlay">
      <div class="top"></div>
      <div class="bottom"></div>
    </div>
    <div class="text">
      <div class="left">
        <div class="top"></div>
        <div class="left"></div>
        <div class="middle"></div>
        <div class="bottom"></div>
        <div class="vert"></div>
      </div>
      <div class="right">
        <div class="top"></div>
        <div class="right"></div>
        <div class="middle"></div>
        <div class="bottom"></div>
      </div>
    </div>
  </div>
</div>

预览效果如下:



  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
很高兴回答您的问题。由于回答篇幅较长,我将简单介绍一下如何用 HTML 和 CSS 写一个书城网站的基本框架,具体的细节和样式可以根据您的需求进行定制。 1. HTML 结构 首先,我们需要定义网页的基本结构,包括头部、主体和底部。其中,头部可以包含网站的名称和标志,搜索框等;主体可以包含书城的分类、热门推荐、新书上架、畅销书籍等信息;底部可以包含网站的联系方式、版权声明等。 下面是一个简单的 HTML 结构示例: ``` <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>书城</title> <link rel="stylesheet" href="style.css"> </head> <body> <header> <h1>书城</h1> <img src="logo.png" alt="书城"> <form> <input type="text" placeholder="搜索"> <button type="submit">搜索</button> </form> </header> <main> <section> <h2>分类</h2> <ul> <li><a href="#">小说</a></li> <li><a href="#">历史</a></li> <li><a href="#">哲学</a></li> <li><a href="#">文学</a></li> </ul> </section> <section> <h2>热门推荐</h2> <ul> <li><a href="#">《活着》</a></li> <li><a href="#">《百年孤独》</a></li> <li><a href="#">《1984》</a></li> <li><a href="#">《红楼梦》</a></li> </ul> </section> <section> <h2>新书上架</h2> <ul> <li><a href="#">《追风筝的人》</a></li> <li><a href="#">《解忧杂货店》</a></li> <li><a href="#">《白夜行》</a></li> <li><a href="#">《围城》</a></li> </ul> </section> <section> <h2>畅销书籍</h2> <ul> <li><a href="#">《平凡的世界》</a></li> <li><a href="#">《人间失格》</a></li> <li><a href="#">《三体》</a></li> <li><a href="#">《活着》</a></li> </ul> </section> </main> <footer> <p>联系方式:xxx-xxxxxxx</p> <p>版权所有 © 2021 书城</p> </footer> </body> </html> ``` 2. CSS 样式 然后,我们需要对网页进行美化,为其添加样式。在这里,我们可以使用 CSS 来为 HTML 元素添加样式,例如设置字体、颜色、间距、背景等。下面是一个简单的 CSS 样式示例: ``` body { font-family: Arial, sans-serif; background-color: #f7f7f7; margin: 0; padding: 0; } header { background-color: #fff; padding: 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); } h1 { margin: 0; font-weight: bold; font-size: 32px; color: #333; } form { display: flex; align-items: center; } input[type="text"] { padding: 10px; border: none; border-radius: 5px; margin-right: 10px; } button[type="submit"] { padding: 10px 20px; background-color: #f60; color: #fff; border: none; border-radius: 5px; cursor: pointer; } main { padding: 20px; display: flex; flex-wrap: wrap; } section { margin-right: 20px; margin-bottom: 20px; flex-basis: calc(25% - 20px); } h2 { font-size: 24px; font-weight: bold; margin: 0 0 10px 0; } ul { list-style: none; padding: 0; margin: 0; } li { margin-bottom: 10px; } a { color: #333; text-decoration: none; } a:hover { color: #f60; } ``` 以上是一个基本的 HTML 和 CSS 的书城网站示例,您可以根据您的需要进行修改和完善。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

前端岚枫

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值