CSS3是最新版本的CSS,学习后可以更好的用于工作及自己修改自己代码的各种样式。

border-radius圆角方法画实心圆。相当于在长方形(正方形)上画半径为边长一半的圆弧。

效果如上图,代码如下:

 <!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>border-radius</title>
<style type="text/css">
body{text-align: center;margin:0; padding:0;}
div.head{width:450px;margin: 0 auto;background: #8f8f8f;line-height: 100px;}
div.content{width:600px;margin: 0 auto;vertical-align: middle;}
.left-block{float:left;width:50%;background:#9a99ff;height: 100px;line-height: 100px;}
.right-block{float:right;width:50%;background: #0000cc;height: 100px;line-height: 50px;}
/*实心圆*/
div.circle{
height:100px;/*与width设置一致*/
width:100px;
background:#9da;
border-radius:50px;
margin:0 auto;
}
/*左半心圆*/
div.left-circle{
height:100px;
width:50px;
background:#9da;
border-radius:50px 0 0 50px;
margin-left: 50px;
float: left;
}
/*右半心圆*/
div.right-circle{
height:100px;
width:50px;
background:#9da;
border-radius:0 50px 50px 0;
margin-left: 100px;
float: left;
}
/*上半心圆*/
div.top-circle{
height:50px;
width:100px;
background:#9da;
border-radius:50px 50px 0 0;
margin-left: 50px;
float: left;
}
/*下半心圆*/
div.bottom-circle{
height:50px;
width:100px;
background:#9da;
border-radius:0 0 50px 50px;
margin-left: 150px;
float: left;
}
</style>
</head>
<body>
<div class="head">
<div class="circle">实心圆</div>
</div>
<div class="content">
<div class="left-block">
<div class="left-circle">左半圆</div>
<div class="right-circle">右半圆</div>
</div>
<div class="right-block">
<div class="top-circle">上半圆</div>
<div class="bottom-circle">下半圆</div>
</div>
</div>
</body>
</html>

学习CSS3之实心圆的更多相关文章

  1. html、css如何画实心圆

    css3画实心圆 实现方法相当简单,css代码如下: .circle{ width:100px; height:100px; border-radius:50px; /* 图形的半径 */ }

  2. 12个学习 CSS3 网站布局设计的优秀案例

    网络上有很多的 CSS 画廊站点供大家对各类网站作品进行打分和评论,每天有数以百计的优秀网站被推荐上面,这对于网页设计师来说是很好的灵感来源.今天,我们选择了15赢得 CSS 设计大奖的优秀作品,帮助 ...

  3. android shap画圆(空心圆、实心圆)

    实心圆: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android=" ...

  4. css3 如何实现圆边框的渐变

    使用 css 实现下面效果: 把效果分解. 代码一: <style> .helper1 { height: 40px; padding: 15px; background: -webkit ...

  5. 跟我学习css3之transition

    HTML5和css3已经是将来的发展趋势,现在有很多移动端还有一些游戏公司已然使用它们开 发了比较成功的产品.我在2011年的时候也跟着技术潮流初浅的学习了html5+css3.毕竟那 时候我没有把学 ...

  6. 用CSS3.0画圆

    CSS3.0中有一个border-radius属性,这个属性允许向 div 元素添加圆角边框,也就是div边角不再一直是直角,在CSS3.0中可以做成圆角了,所以我们可以用这个属性用div画一个圆,或 ...

  7. 学习 | css3基本动画之demo篇

    移动端使用的框架是zepto,但是zepto的内置对象没有传统的animate这个方法,效果都是需要css3来实现的,zepto也不支持fadeIn和fadeOut等一些基本的动画,基于这一现状,我自 ...

  8. 学习CSS3动画(animation)

    CSS3就是出了不少高大上的功能,3D效果.动画.多列等等.今天写篇文章记录怎么一下怎么用CSS3写一个动画. 丑话还得说前头,IE9以及以下版本不支持CSS3动画(如真要实现可以考虑用js,不过估计 ...

  9. 。。。学习CSS3的第一个属性border-radius。。。

    学习border-radius,感觉这个文档写的很不错: http://blog.sina.com.cn/s/blog_61671b520101gelr.html

随机推荐

  1. 拖拽模块move1

    刚开的博客,想着写点什么,以前写过拖拽函数,后来又学习了模块化,于是一直想把之前写的拖拽函数封成一个独立的模块,方便以后调用,说干就干,下面码代码... <script> var move ...

  2. MyBatis打印SQL执行时间

    1.plugins MyBatis官网对于plugins的描述是这样的: MyBatis allows you to intercept calls to at certain points with ...

  3. IOC框架:Unity

    Unity 是一个轻量级.可扩展的依赖注入容器,支持构造函数.属性和方法调用注入. 在进行项目之前通过Nuget安装Unity 简单的例子 定义一个接口 namespace UnityTest { / ...

  4. CentOS 6 安装HBase集群教程

    hbase0.99.2安装包下载(链接:https://pan.baidu.com/s/1dR-HB3P6mzsXVW6sLI8uxQ 密码:4g1n) 首先需要安装  zookeeper(点击查看) ...

  5. python_code list_3

    >>> seq=['foo','x41','?','***']>>> def func(x): return x.isalnum() >>> li ...

  6. iOS 波浪效果的实现

    iOS 波浪效果的实现 p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #4f8187; background-c ...

  7. 论C++如何优雅的使用数组

    C/C++中如果一个函数接受一个数组作为参数,那么数组将会被退化为指针,如果定义如下代码: //数组arr的大小未知. int arrsize(int arr*) { cout << &q ...

  8. Spring Boot 使用 Log4j2

    Java 中比较常用的日志工具类,有 Log4j.SLF4j.Commons-logging(简称jcl).Logback.Log4j2(Log4j 升级版).Jdk Logging. Spring ...

  9. sql语句的一些案列!

    http://www.cnblogs.com/skynet/archive/2010/07/25/1784892.html

  10. ScalaPB(5):用akka-stream实现reactive-gRPC

      在前面几篇讨论里我们介绍了scala-gRPC的基本功能和使用方法,我们基本确定了选择gRPC作为一种有效的内部系统集成工具,主要因为下面gRPC支持的几种服务模式: .Unary-Call:独立 ...