Html实现边框圆角的实例详解

Y2J
Release: 2017-05-24 09:53:55
Original
4556 people have browsed it

这篇文章主要为大家详细介绍了html轻松实现圆角矩形的方法,告诉大家如何通过p+css以及定位来实现圆角矩形?感兴趣的小伙伴们可以参考一下

问题:如何通过p+css以及定位来实现圆角矩形?
 
解决方法概述:
 
内容:首先在标签内部里添加一个大层(大层用来固定整体大框架),然后大层内包含四个小层(四个小层里分别放四个圆角(事先用ps做好椭圆形形状,然后用切片工具切图 ))
 
样式:在<head>标签内部设置的css要有的属性
 
1.position:relative;
 
2.宽和高;
 
3背景颜色;
 
4.边框线(用来调整四个原角的相对位置,调整好后可以将边框线设置删除
 
在设置小层的css时,每个层里都要有的属性有:
 
1.position:absolute;
 
2.宽和高;
 
3.方向属性(leftrightbottom,top
 
4.background:url("")no-repeat;(引入各个方向的圆角图片)
 
以下是我实现圆角矩形的代码:


XML/HTML Code复制内容到剪贴板

  
    
 
  
  
  
  
    
  圆角制作  
  
 
 

Copy after login

注意:我的代码里用的css样式是内联式,CSS样式有三种:内联式,嵌入式,外部式。

【相关推荐】

1. HTML免费视频教程

2. html实现固定表格四周并且可以上下左右滚动

3. 详解前端开发常用的HTML标签

4. 通过marquee标签完成滚动效果的纯html代码

5. 用HTML编写个人简历的代码实例

The above is the detailed content of Html实现边框圆角的实例详解. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!