CSS3综合实训

CSS3

    <style>
        div{
            width: 100px;
            height: 100px;
            border-radius: 3px 3px;
            border: 1px solid #000;
        }
    </style>

在这里插入图片描述
当border-radius=width的二分之一或50%时
在这里插入图片描述

        div{
            width: 100px;
            height: 100px;
            border-top-left-radius: 5px;
            border-top-right-radius: 5px;
            border-bottom-right-radius: 5px;
            border-bottom-left-radius: 5px;
            border: 1px solid #000;
            box-shadow: 5px 5px 5px 5px gray inset;
        }

而border-radius可分为border-top-left-radius, border-top-right-radius, border-bottom-right-radius,border-bottom-left-radius。取值分为x轴偏移量和y轴偏移量,写一个默认xy值一样

        div{
            width: 100px;
            height: 100px;
            border-radius: 50%;
            border: 1px solid #000;
            box-shadow: 5px 5px 5px 5px gray inset;
        }

box-shadow:水平偏移量 垂直偏移量 模糊距离 阴影尺寸 阴影颜色 内或外阴影
在这里插入图片描述

渐变

        div{
            width: 100px;
            height: 100px;
            border-top-left-radius: 5px;
            border-top-right-radius: 5px;
            border-bottom-right-radius: 5px;
            border-bottom-left-radius: 5px;
            background-image: linear-gradient(to top,red 0%,blue 100%);
        }

在这里插入图片描述
线型渐变 to+朝向,颜色 颜色所在位置,颜色 颜色所在位置。
朝向:top left bottom right 度数(deg)

        div{
            width: 100px;
            height: 100px;
            border-top-left-radius: 5px;
            border-top-right-radius: 5px;
            border-bottom-right-radius: 5px;
            border-bottom-left-radius: 5px;
            background-image: radial-gradient(40px at 50px 50px,red,blue)
        }

在这里插入图片描述
径向渐变:半径 at 圆心坐标,颜色 颜色所在位置,颜色 颜色所在位置。

字体阴影

{
	text-shadow: 5px 5px 5px #FF0000;
}

在这里插入图片描述
文字阴影: 水平偏移 垂直偏移 模糊距离 阴影颜色

div
{
	width:100px;
	height:100px;
	background:red;
	transition:width 2s;
	-webkit-transition:width 2s;
}

div:hover
{
	width:300px;
}

css过渡:监听过渡状态改变 width height or all,多个要用","连接
过渡所用时间: nums
运动状态:
linear 规定以相同速度开始至结束的过渡效果。
ease 规定慢速开始,然后变快,然后慢速结束的过渡效果。
ease-in 规定以慢速开始的过渡效果。
ease-out 规定以慢速结束的过渡效果。
ease-in-out 规定以慢速开始和结束的过渡效果。
延时 nums

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值