css3 边框圆角以及切图

本文探讨了CSS3中的边框圆角属性及其在网页设计中的应用,同时介绍了如何利用CSS3进行高效切图,提升网页视觉效果。
摘要由CSDN通过智能技术生成

css3 边框圆角 切图

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>CSS3 边框</title>
	<style>
		body, ul, li, dl, dt, dd, h1, h2, h3, h4, h5 {
   
			margin: 0;
			padding: 0;
		}

		body {
   
			background-color: #F7F7F7;
		}

		.wrapper {
   
			width: 1000px;
			margin: 0 auto;
			padding: 20px;
			box-sizing: border-box;
		}

		header {
   
			padding: 20px 0;
			margin-bottom: 20px;
			text-align: center;
		}
		header h3 {
   
			line-height: 1;
			font-weight: normal;
			font-size: 28px;
		}

		.main {
   
			/*overflow: hidden;*/
		}

		.main:after {
   
			content: '';
			clear: both;
			display: block;
		}

		.main .item {
   
			width: 210px;
			height: 210px;
			margin: 0 30px 30px 0;
			display: flex;
			position: relative;
			background-color: #FFF;
			float: left;
			box-shadow: 2px 2px 5px #CCC;
		}
		
		.main .item:after {
   
			content: attr(data-brief);
			display: block;
			width: 100%;
			height: 100%;
			text-align: center;
			line-height: 210px;
			position: absolute;
			top: 0;
			left: 0;
			color: #FFF;
			font-family: '微软雅黑';
			font-size: 18px;
			background-color: rgba(170, 170, 170, 0);
			z-index: -1;
			transition: all 0.3s ease-in;
		}

		.main .item:hover:after {
   
			background-color: rgba(170, 170, 170, 0.6);
			z-index: 100;
		}

		.main .item:nth-child(4n) {
   
			margin-right: 0;
		}

		/*.main .item:nth-last-child(-n+5) {
			margin-bottom: 0;
		}*/

		/* 以上是骨架样式 */
		/* 1、2、3、4 顺时针 */
		.border-radius {
   
			width: 180px;
			height: 180px;
			margin: auto;
			border: 1px solid red;
			/*border-radius: 50% 30% 20%;*/
		}
		
		.square {
   
			border-radius: 0;
		}
		
		/*拱形*/
		.item:nth-child(1) .border-radius {
   
			border-radius: 90px;
		}

		/*拱形*/
		.item:nth-child(2) .border-radius {
   
			border-radius: 90px 90px 0 0;
		}

		/*半圆*/
		.item:nth-child(3) .border-radius {
   
			height: 90px;
			border-radius: 90px 90px 0 0;
		}

		/*左上角*/
		.item:nth-child(4) .border-radius {
   
			/*height: 90px;*/
			border-radius: 90px 0 0 0;
		}

		/*四分之一圆*/
		.item:nth-child(5) .border-radius {
   
			width: 90px;
			height: 90px;
			border-radius: 90px 0 0 0;
		}

		/*横着的椭圆*/
		.item:nth-child(6) .border-radius {
   
			height
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值