惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
N
Netflix TechBlog - Medium
Google Online Security Blog
Google Online Security Blog
月光博客
月光博客
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
V
V2EX
腾讯CDC
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
M
MIT News - Artificial intelligence
Vercel News
Vercel News
The GitHub Blog
The GitHub Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
Apple Machine Learning Research
Apple Machine Learning Research
aimingoo的专栏
aimingoo的专栏
博客园 - 三生石上(FineUI控件)
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
MongoDB | Blog
MongoDB | Blog
H
Help Net Security
The Cloudflare Blog
Blog — PlanetScale
Blog — PlanetScale
F
Full Disclosure
G
Google Developers Blog
罗磊的独立博客
Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Y
Y Combinator Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
J
Java Code Geeks
A
About on SuperTechFans
IT之家
IT之家
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
有赞技术团队
有赞技术团队
GbyAI
GbyAI
雷峰网
雷峰网
T
The Blog of Author Tim Ferriss
The Register - Security
The Register - Security
U
Unit 42
D
Docker
Martin Fowler
Martin Fowler
L
LINUX DO - 热门话题
NISL@THU
NISL@THU
阮一峰的网络日志
阮一峰的网络日志
C
Cybersecurity and Infrastructure Security Agency CISA
博客园_首页
Google DeepMind News
Google DeepMind News

博客园 - 蓝蓝的天2016

学习materialize VS2013 启用avalon 智能提示 Intelligence 推荐一款开源的C#TCP通讯框架 js/jquery 获取本地文件的文件路劲 获取input框中type=‘file’ 中的文件路径(转载) HTML5的 input:file上传类型控制(转载) tinymce4.x 上传本地图片 (转载) Jquery append()总结(一) 转载 Visual Studio各版本工程文件之间的转换 [转载] 创建数据库表(转载) 用IIS防止mdb数据库被下载(转载) 放映PPT幻灯片演示文稿如何让演讲者备注不投影到屏幕上(转载) 操作App.config的类(转载) C# MemoryCache 类[转载] 微信 学习网址 winform 路径 CodeSimth - .Net Framework Data Provider 可能没有安装。解决方法[转载 ] 加载js代码 tinymce 上传图片空间(转) 页面跳转
转载css3 图片圆形显示 如何CSS将正方形图片显示为圆形图片布局
蓝蓝的天2016 · 2016-05-27 · via 博客园 - 蓝蓝的天2016

转载  原文:http://www.divcss5.com/wenji/w732.shtml

 原本不是圆形图片,通过CSS样式布局实现成圆形图片,首先图片必须为正方形。

二、使用布局技术   -   TOP

使用CSS3 圆角技术实现。

使用CSS3样式单词:border-radius

语法:

  1. div{border-radius:5px} 

对图片设置圆角样式:

  1. .abc img{border-radius:5px} 

设置class=”abc”对象图片四个角圆角为5px

三、CSS圆角实现图片圆形实例   -   TOP

首先一张正方形图片,放入一个DIV盒子内,通过对盒子内图片设置border-radius:50%实现圆形效果。

本案例在DIVCSS5初始化模板基础上完成。

1、HTML源代码完整代码:

  1. <!DOCTYPE html
  2. <html
  3. <head
  4. <meta charset="utf-8" /> 
  5. <title>图片圆形布局 在线演示 DIVCSS5</title
  6. <link href="images/style.css" rel="stylesheet" type="text/css" /> 
  7. </head
  8. <body
  9. <div id="divcss5"><img src="images/1.jpg" /></div
  10. </body
  11. </html

2、对应CSS代码:

  1. #divcss5{ margin:10px auto} 
  2. #divcss5 img{ border-radius:50%} 

命名盒子“id=divcss5”盒子居中,同时上下外间距为10px;,然后设置对象盒子里img图片圆角50%

3、浏览器效果截图