1.圆角的使用

 <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
div{
width: 200px;
height: 100px;
border: 1px solid red;
background-color: red;
/*添加圆角*/
/*border-radius:10px; 一个值是四个角都一样*/
/*border-radius:10px 30px;
第一个值左上 右下 第二个值右上 左下*/
/*border-radius:10px 30px 60px;
第一个值是左上 第二个值是右上 和左下 第三个值是右下*/
/*border-radius:10px 30px 60px 80px;
遵循左上 右上 右下 左下的顺序*/ /*添加椭圆*/
/*border-radius:100px/50px
添加/是用来设置当前不同方向的半径
水平方向x轴/垂直方向y轴
*/
border-radius:100px/50px; /*添加某个角的圆角*/
/*border-top-left-radius: 10px;*/ /*设置某个角的不同方向上的不同圆角值*/
/*border-top-left-radius: 100px 50px;
border-bottom-left-radius: 100px 50px;*/ /*若果四个角的不同方向上的不同圆角值
分别是
水平方向的:左上 右上 右下 左下/垂直方向:左上 右上 右下 左下
*/
border-radius: 100px 80px 70px 60px/20px 50px 80px 90px;
}
</style>
</head>
<body>
<div></div>
</body>
</html>

2.安卓机器人小案例:结合伪元素实现

 <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
*{
margin: 0;
height: 0;
}
.content{
width: 500px;
height: 500px;
border: 1px solid red;
margin: 50px auto;
}
.an_header{
width: 250px;
height: 125px;
background-color: green;
margin: 10px auto;
border-radius: 125px 125px 0 0;
position: relative;
}
.an_header::before,.an_header::after{
content: "";
width: 20px;
height: 20px;
border-radius: 10px;
background-color: #fff;
position: absolute;
bottom: 40px;
}
.an_header::before{
left: 70px;
}
.an_header::after{
right: 70px;
}
.an_body{
width: 250px;
height: 250px;
background-color: green;
border-radius: 0 0 20px 20px;
margin: 0px auto;
position: relative;
}
.an_body::before,
.an_body::after{
content: "";
width: 30px;
height: 180px;
position: absolute;
background-color: green;
top: 30px;
border-radius: 10px;
}
.an_body::before{
left: -40px;
}
.an_body::after{
right: -40px;
}
.an_footer{
width: 250px;
height: 100px;
margin: 0px auto;
position: relative;
}
.an_footer::before,
.an_footer::after{
content: "";
width: 30px;
height: 90px;
position: absolute;
background-color: green;
top: 0px;
border-radius: 0 0 10px 10px;
}
.an_footer::before{
left: 50px;
}
.an_footer::after{
right: 50px;
}
</style>
</head>
<body>
<div class="content">
<div class="an_header"></div>
<div class="an_body"></div>
<div class="an_footer"></div>
</div>
</body>
</html>

效果图:

h5-圆角的使用-案例安卓机器人的更多相关文章

  1. MFC简单绘制安卓机器人

    原始日期:2014-03-29 20:35 众所周知,google的安卓机器人形象十分经典,包括眼睛的位置,胳膊以及天线的位置都是有固定位置和比例的,而且是最恰当的,看起来最美.而微软基础类库MFC绘 ...

  2. H5外包团队 2019案例更新

    H5外包团队 2019案例更新 本项目控件均为动态加载,3D部分使用Unity3D,其它基于ReactJS,NodeJS,部分使用cocos2D,由于项目涉密,只能发部分截图,欢迎联系索取更多案例,企 ...

  3. H5页面中判断是安卓手机还是ios手机的方法;APP页面中嵌套的H5跳转到APP其他页面的方法。

    (一).在H5页面中,可以直接利用如下的方法来进行判断是安卓还是ios. var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linu ...

  4. H5移动端项目案例、web手机微商城实战开发

    自微信生态圈一步步强大后,关于移动端购物的趋势,逐渐成为大众关心的内容,目前市场上关于移动商城的制定就有大量版本,比如.微商城.移动商城.移动webAPP.微信商城各等各种定义层出不穷,这就对于移动端 ...

  5. Android中使用Canvas和Paint绘制一个安卓机器人

    场景 在Android中画笔使用Paint类,画布使用Canvas类来表示. 绘图的基本步骤 首先编写一个继承自View的自定义View类,然后重写其onDraw方法,最后把自定义的view添加到ac ...

  6. h5博彩webapp项目实例|h5棋牌游戏|h5博彩app案例

    html5实现的博彩webapp.h5棋牌app实例,运用h5+css3+zepto+jQ+swiper+layer等技术进行布控开发,750px最大宽度适配手机端设备,采用flex+rem布局样式. ...

  7. css3 特效拓展 画个安卓机器人

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  8. 将h5用HBuilderX打包成安卓app后,document.documentElement.scrollTop的值始终为0或者document.body.scrollTop始终为0

    let time = setInterval(() => { let scroll = document.documentElement.scrollTop || document.body.s ...

  9. 【Android】我有放入Icon到mipmap,但不显示,只显示安卓机器人Icon(Android 8.0 图标适配)

    首先,放上别人写的博客,而我自己的博客,只会写大概思路,给自己留给备忘 https://blog.csdn.net/guolin_blog/article/details/79417483 其实会发生 ...

随机推荐

  1. CSS - input 只显示下边框

      CSS 样式 :   border:none;   border-bottom: 1px solid #000

  2. Linux下部署开源版“禅道”项目管理系统《转载》

    Linux下部署开源版“禅道”项目管理系统 https://www.cnblogs.com/xxsl/p/6525378.html

  3. 略坑的C#自动回收机制

    说起这个坑货,要说说折腾了好久的bug,项目对方需要在32位系统上使用,C#加载图像扔给C++处理再返回.所以想好了,C#这边加载图像开好内存扔给C++,各自开的内存各自释放. 所以,在32位系统上出 ...

  4. hibernate字段值无法保存

    通过hibernate对Blogstorage对象进行保存操作,filepath属性的值无论设置多少遍都保存不进去 后来发现是 Blogstorage.hbm.xml 里面根本没有配置filepath ...

  5. cf749 D. Leaving Auction

    #include<bits/stdc++.h> #define lowbit(x) x&(-x) #define LL long long #define N 200005 #de ...

  6. Zookeeper 在 Kafka 中的作用

    https://www.jianshu.com/p/a036405f989c 待整理...

  7. SciKit-Learn 使用matplotlib可视化数据

    章节 SciKit-Learn 加载数据集 SciKit-Learn 数据集基本信息 SciKit-Learn 使用matplotlib可视化数据 SciKit-Learn 可视化数据:主成分分析(P ...

  8. UVA - 11925 Generating Permutations(生成排列)(构造)

    题意:将序列1,2,3,……,n,用不超过2n^2次操作,通过下列操作变成给定序列.(1<=n<=300) 1.交换前两个元素 2.将第一个元素移到最后 分析:因为将序列变成升序更容易操作 ...

  9. css常用技巧1

    css绘制三角形 <style> .triangle-box{ margin: 50px auto; height: 300px; width: 500px; box-shadow: 1p ...

  10. java课程之团队开发冲刺阶段2.5

    总结昨天进度: 1.昨天对课前提醒的基本框架已经搭好,剩下的就是对如何提醒进行设置 遇到的困难: 1.在一些细节地方,代码有点犯浑,将Preferences的文件写错了,导致在用switch开关得到时 ...