开发者社区> 问答> 正文

这样一个布局如何用HTML5和CSS3来显示?

screenshot这样一个布局如何用HTML5和CSS3来显示?

展开
收起
小旋风柴进 2016-06-07 10:37:39 2210 0
1 条回答
写回答
取消 提交回答
  • border-radius变为圆形,2个圆形嵌套

     <!doctype html>
    <style>
    body{background:#ccc}
    div.line{height:30px;background:#000;position:relative}
    div.line div{-moz-border-radius:30px;-webkit-border-radius:30px;border-radius:30px;-khtml-border-radius:30px;background:#000;position:absolute;width:60px;height:60px;left:50%;margin-left:-30px;bottom:0}
    div.line div.orange{-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;-khtml-border-radius:20px;background-color:orange;width:40px;height:40px;left:50%;margin-left:-20px;bottom:10px}
    </style><br /><br /><br />
    <div class="line">
        <div></div>
        <div class="orange"></div>
    </div>
    2019-07-17 19:29:31
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
零基础CSS入门教程 立即下载
天猫 HTML5 互动技术实践 立即下载
天猫HTML5互动技术实践 立即下载