2024-07-12
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
Transformation can be simply understood as deformation.
Move: translate
Rotate: rotate
Zoom: sCale
- /* 移动盒子的位置: 定位 盒子的外边距 2d转换移动 */
-
-
-
- div {
-
- width: 200px;
-
- height: 200px;
-
- background-color: pink;
-
- /* x就是x轴上移动位置 y 就是y轴上移动位置 中间用逗号分隔*/
-
- /* transform: translate(x, y); */
-
- /* transform: translate(100px, 100px); */
-
- /* 1. 我们如果只移动x坐标 */
-
- /* transform: translate(100px, 0); */
-
- /* transform: translateX(100px); */
-
- /* 2. 我们如果只移动y坐标 */
-
- /* transform: translate(0, 100px); */
-
- /* transform: translateY(100px); */
-
- }
-
-
-
- div:first-child {
-
- transform: translate(30px, 30px);
-
- }
-
-
-
- div:last-child {
-
- background-color: purple;
-
- }
- div {
-
- position: relative;
-
- width: 500px;
-
- height: 500px;
-
- background-color: pink;
-
- /* 1. 我们tranlate里面的参数是可以用 % */
-
- /* 2. 如果里面的参数是 % 移动的距离是 盒子自身的宽度或者高度来对比的 */
-
- /* 这里的 50% 就是 50px 因为盒子的宽度是 100px */
-
- /* transform: translateX(50%); */
-
- }
-
- p {
-
- position: absolute;
-
- top: 50%;
-
- left: 50%;
-
- width: 200px;
-
- height: 200px;
-
- background-color: purple;
-
- /* margin-top: -100px;
-
- margin-left: -100px; */;
-
- /* 盒子往上走自己高度的一半 */
-
- transform: translate(-50%, -50%);
-
- }
- img {
-
- width: 150px;
-
- /* 顺时针旋转45度 */
-
- /* transform: rotate(45deg); */
-
- border-radius: 50%;
-
- border: 5px solid pink;
-
- /* 过渡写到本身上,谁做动画给谁加 */
-
- transition: all 0.3s;
-
- }
-
-
-
- img:hover {
-
- transform: rotate(90deg);
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <img src="media/pic.jpg" alt="">
-
- </body>
- div {
-
- position: relative;
-
- width: 249px;
-
- height: 35px;
-
- border: 1px solid #000;
-
- }
-
- div::after {
-
- content: "";
-
- position: absolute;
-
- top: 8px;
-
- right: 15px;
-
- width: 10px;
-
- height: 10px;
-
- border-right: 1px solid #000;
-
- border-bottom: 1px solid #000;
-
- transform: rotate(45deg);
-
- transition: all 0.2s;
-
- }
-
- /* 鼠标经过div 里面的三角旋转 */
-
-
-
- div:hover::after {
-
- transform: rotate(225deg);
-
- }
1. Grammar
transform-origin:xy;
2. Key Points
Note that the following parameters x and y are separated by spaces.
The default xy transformation center point is the center point of the element (50% 50%)
You can also set pixels or position nouns for xy (top bottom left right center)
- div {
-
- width: 200px;
-
- height: 200px;
-
- background-color: pink;
-
- margin: 100px auto;
-
- transition: all 1s;
-
- /* 1.可以跟方位名词 */
-
- /* transform-origin: left bottom; */
-
- /* 2. 默认的是 50% 50% 等价于 center center */
-
- /* 3. 可以是px 像素 */
-
- /* transform-origin: 80px 80px; */
-
- /* transform-origin: top left; */
-
- transform-origin: bottom right ;
-
- }
-
-
-
- div:hover {
-
- transform: rotate(360deg);
-
- }
- div {
-
- overflow: hidden;
-
- width: 200px;
-
- height: 200px;
-
- border: 1px solid pink;
-
- margin: 10px;
-
- float: left;
-
- }
-
- div::before {
-
- content: "小猪佩奇";
-
- display: block;
-
- width: 100%;
-
- height: 100%;
-
- background-image: url("./media/pig.jpg");
-
- transform: rotate(180deg);
-
- transform-origin: left bottom;
-
- transition: all 0.4s;
-
- }
-
- /* 鼠标经过div 里面的before 复原 */
-
-
-
- div:hover::before {
-
- transform: rotate(0deg);
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <div></div>
-
- <div></div>
-
- <div></div>
- div {
-
- width: 200px;
-
- height: 200px;
-
- background-color: pink;
-
- margin: 100px auto;
-
- /* transform-origin: left bottom; */
-
- }
-
-
-
- div:hover {
-
- /* 1. 里面写的数字不跟单位 就是倍数的意思 1 就是1倍 2就是 2倍 */
-
- /* transform: scale(x, y); */
-
- /* transform: scale(2, 2); */
-
- /* 2. 修改了宽度为原来的2倍 高度 不变 */
-
- /* transform: scale(2, 1); */
-
- /* 3. 等比例缩放 同时修改宽度和高度,我们有简单的写法 以下是 宽度修改了2倍,高度默认和第一个参数一样*/
-
- /* transform: scale(2); */
-
- /* 4. 我们可以进行缩小 小于1 就是缩放 */
-
- /* transform: scale(0.5, 0.5); */
-
- /* transform: scale(0.5); */
-
- /* 5. scale 的优势之处: 不会影响其他的盒子 而且可以设置缩放的中心点*/
-
- /* width: 300px;
-
- height: 300px; */
-
- transform: scale(2);
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <div></div>
-
- 123123
- li {
-
- float: left;
-
- width: 30px;
-
- height: 30px;
-
- border: 1px solid pink;
-
- margin: 10px;
-
- text-align: center;
-
- line-height: 30px;
-
- list-style: none;
-
- border-radius: 50%;
-
- /* 小手 */
-
- cursor: pointer;
-
- transition: all .4s;
-
- }
-
-
-
- li:hover {
-
- transform: scale(1.2);
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <ul>
-
- <li>1</li>
-
- <li>2</li>
-
- <li>3</li>
-
- <li>4</li>
-
- <li>5</li>
-
- <li>6</li>
-
- <li>7</li>
-
- </ul>
- div {
-
- width: 200px;
-
- height: 200px;
-
- background-color: pink;
-
- transition: all .5s;
-
- }
-
-
-
- div:hover {
-
- /* transform: rotate(180deg) translate(150px, 50px); */
-
- /* 我们同时有位移和其他属性,我们需要把位移放到最前面 */
-
- transform: translate(150px, 50px) rotate(180deg) scale(1.2);
-
- }
There are two steps to creating an animation:
1. Define the animation first
2. Reuse (call) animation
1. Define animations with keyframes (similar to defining class selectors)
@keyframes animation name {
0%{
width:100px;
}
100%{
width:200px;
}
}
2. Use animations for elements
div{
width:200px;height:200px;background-color:aqua;margin:100px auto;
/*Call animation*/
animation-name: animation name;
/*duration*/
animation-duration: duration;}
- /* 我们想页面一打开,一个盒子就从左边走到右边 */
-
- /* 1. 定义动画 */
-
-
-
- @keyframes move {
-
- /* 开始状态 */
-
- 0% {transform: translateX(0px);}
-
- /* 结束状态 */
-
- 100% {transform: translateX(1000px);}
-
- }
-
- div {
-
- width: 200px;
-
- height: 200px;
-
- background-color: pink;
-
- /* 2. 调用动画 */
-
- /* 动画名称 */
-
- animation-name: move;
-
- /* 持续时间 */
-
- animation-duration: 2s;
-
- }
- /* from to 等价于 0% 和 100% */
-
- /* @keyframes move {
-
- from {
-
- transform: translate(0, 0);
-
- }
-
- to {
-
- transform: translate(1000px, 0);
-
- }
-
- } */
-
- /* 动画序列 */
-
- /* 1. 可以做多个状态的变化 keyframe 关键帧 */
-
- /* 2. 里面的百分比要是整数 */
-
- /* 3. 里面的百分比就是 总的时间(我们这个案例10s)的划分 25% * 10 = 2.5s */
-
-
-
- @keyframes move {
-
- 0% {
-
- transform: translate(0, 0);
-
- }
-
- 25% {
-
- transform: translate(1000px, 0)
-
- }
-
- 50% {
-
- transform: translate(1000px, 500px);
-
- }
-
- 75% {
-
- transform: translate(0, 500px);
-
- }
-
- 100% {
-
- transform: translate(0, 0);
-
- }
-
- }
-
-
-
- div {
-
- width: 100px;
-
- height: 100px;
-
- background-color: pink;
-
- animation-name: move;
-
- animation-duration: 10s;
-
- }
Attributes | describe |
@keyframes | Prescribed animation |
animation | Shorthand properties for all animation properties |
animation-name | Specifies the name of the @keyframes animation (required) |
animation-duration | Specifies the number of seconds or milliseconds it takes for the animation to complete a cycle. The default value is 0. (Required) |
aniamtion-timing-function | Specifies the speed curve of the animation, the default is 'ease' |
animation-delay | Specifies when the animation starts. The default value is 0. |
animation-iteration-count | Specifies the number of times the animation is played. The default is 1, and there is infinite |
animation-direction | Specifies whether the animation should be played in reverse in the next cycle. The default is 'normal', alternate plays in reverse |
animation-play-state | Specifies whether the animation is running or paused. The default is 'running', and there is also 'pause' |
animation-fill-mode | Specifies the state after the animation ends, keeps forwards, and returns to the starting backwards |
- @keyframes move {
-
- 0% {
-
- transform: translate(0, 0);
-
- }
-
- 100% {
-
- transform: translate(1000px, 0);
-
- }
-
- }
-
-
-
- div {
-
- width: 100px;
-
- height: 100px;
-
- background-color: pink;
-
- /* 动画名称 */
-
- animation-name: move;
-
- /* 持续时间 */
-
- animation-duration: 2s;
-
- /* 运动曲线 */
-
- /* animation-timing-function: ease; */
-
- /* 何时开始 */
-
- animation-delay: 2s;
-
- /* 重复次数 iteration 重复的 conut 次数 infinite 无限 */
-
- /* animation-iteration-count: infinite; */
-
- /* 是否反方向播放 默认的是 normal 如果想要反方向 就写 alternate */
-
- /* animation-direction: alternate; */
-
- /* 动画结束后的状态 默认的是 backwards 回到起始状态 我们可以让他停留在结束状态 forwards */
-
- /* animation-fill-mode: forwards; */
-
- /* animation: name duration timing-function delay iteration-count direction fill-mode; */
-
- /* animation: move 2s linear 0s 1 alternate forwards; */
-
- /* 前面2个属性 name duration 一定要写 */
-
- /* animation: move 2s linear alternate forwards; */
-
- }
-
-
-
- div:hover {
-
- /* 鼠标经过div 让这个div 停止动画,鼠标离开就继续动画 */
-
- animation-play-state: paused;
-
- }
- body {
-
- background-color: #333;
-
- }
-
-
-
- .map {
-
- position: relative;
-
- width: 747px;
-
- height: 616px;
-
- background: url(media/map.png) no-repeat;
-
- margin: 0 auto;
-
- }
-
-
-
- .city {
-
- position: absolute;
-
- top: 227px;
-
- right: 193px;
-
- color: #fff;
-
- }
-
-
-
- .tb {
-
- top: 500px;
-
- right: 80px;
-
- }
-
-
-
- .dotted {
-
- width: 8px;
-
- height: 8px;
-
- background-color: #09f;
-
- border-radius: 50%;
-
- }
-
-
-
- .city div[class^="pulse"] {
-
- /* 保证我们小波纹在父盒子里面水平垂直居中 放大之后就会中心向四周发散 */
-
- position: absolute;
-
- top: 50%;
-
- left: 50%;
-
- transform: translate(-50%, -50%);
-
- width: 8px;
-
- height: 8px;
-
- box-shadow: 0 0 12px #009dfd;
-
- border-radius: 50%;
-
- animation: pulse 1.2s linear infinite;
-
- }
-
- .city div.pulse2 {
-
- animation-delay: 0.4s;
-
- }
-
-
-
- .city div.pulse3 {
-
- animation-delay: 0.8s;
-
- }
-
-
-
- @keyframes pulse {
-
- 0% {}
-
- 70% {
-
- /* transform: scale(5); 我们不要用scale 因为他会让 阴影变大*/
-
- width: 40px;
-
- height: 40px;
-
- opacity: 1;
-
- }
-
- 100% {
-
- width: 70px;
-
- height: 70px;
-
- opacity: 0;
-
- }
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <div class="map">
-
- <div class="city">
-
- <div class="dotted"></div>
-
- <div class="pulse1"></div>
-
- <div class="pulse2"></div>
-
- <div class="pulse3"></div>
-
- </div>
-
- <div class="city tb">
-
- <div class="dotted"></div>
-
- <div class="pulse1"></div>
-
- <div class="pulse2"></div>
-
- <div class="pulse3"></div>
-
- </div>
-
- </div>
- div {
-
- overflow: hidden;
-
- font-size: 20px;
-
- width: 0;
-
- height: 30px;
-
- background-color: pink;
-
- /* 让我们的文字强制一行内显示 */
-
- white-space: nowrap;
-
- /* steps 就是分几步来完成我们的动画 有了steps 就不要在写 ease 或者linear 了 */
-
- animation: w 4s steps(10) forwards;
-
- }
-
-
-
- @keyframes w {
-
- 0% {
-
- width: 0;
-
- }
-
- 100% {
-
- width: 200px;
-
- }
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <div>世纪佳缘我在这里等你</div>
- body {
-
- background-color: #ccc;
-
- }
-
-
-
- div {
-
- position: absolute;
-
- width: 200px;
-
- height: 100px;
-
- background: url(media/bear.png) no-repeat;
-
- /* 我们元素可以添加多个动画, 用逗号分隔 */
-
- animation: bear .6s steps(8) infinite, move 4s forwards;
-
- }
-
-
-
- @keyframes bear {
-
- 0% {
-
- background-position: 0 0;
-
- }
-
- 100% {
-
- background-position: -1600px 0;
-
- }
-
- }
-
-
-
- @keyframes move {
-
- 0% {
-
- left: 0;
-
- }
-
- 100% {
-
- left: 50%;
-
- /* margin-left: -100px; */
-
- transform: translateX(-50%);
-
- }
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <div></div>
The three-dimensional coordinate system actually refers to three-dimensional space, which is composed of three axes.
x-axis: horizontal to the right Note: X is positive on the right and negative on the left
y-axis: vertically downward Note: positive values are below y and negative values are above y
z-axis: vertical to the screen Note: positive values are toward the outside and negative values are toward the inside
Translform: translateX (100px): only moves on the x-axis
Translform: translateY (100px): only moves on the Y axis
transform:translateZ(100px): only moves on the z axis (note: translateZ is generally in px units) transform:translate3d(x, y,): where x, y, and z refer to the distance in the direction of the axis to be moved.
- body {
-
- /* 透视写到被观察元素的父盒子上面 */
-
- perspective: 200px;
-
- }
-
-
-
- div {
-
- width: 200px;
-
- height: 200px;
-
- background-color: pink;
-
- /* transform: translateX(100px);
-
- transform: translateY(100px); */
-
- /* transform: translateX(100px) translateY(100px) translateZ(100px); */
-
- /* 1. translateZ 沿着Z轴移动 */
-
- /* 2. translateZ 后面的单位我们一般跟px */
-
- /* 3. translateZ(100px) 向外移动100px (向我们的眼睛来移动的) */
-
- /* 4. 3D移动有简写的方法 */
-
- /* transform: translate3d(x,y,z); */
-
- /* transform: translate3d(100px, 100px, 100px); */
-
- /* 5. xyz是不能省略的,如果没有就写0 */
-
- transform: translate3d(200px, 100px, 100px);
-
- }
- body {
-
- perspective: 600px;
-
- /* 透视写到被观擦元素的父盒子上面 */
-
- }
-
-
-
- div {
-
- width: 200px;
-
- height: 200px;
-
- background-color: pink;
-
- margin: 100px auto;
-
- transform: translateZ(0);
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <div></div>
-
- <div></div>
-
- <div></div>
-
- </body>
- body {
-
- perspective: 300px;
-
- }
-
-
-
- img {
-
- display: block;
-
- margin: 100px auto;
-
- transition: all 1s;
-
- }
-
-
-
- img:hover {
-
- transform: rotateX(45deg);
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <img src="media/pig.jpg" alt="">
-
-
- body {
-
- perspective: 500px;
-
- }
-
-
-
- img {
-
- display: block;
-
- margin: 100px auto;
-
- transition: all 1s;
-
- }
-
-
-
- img:hover {
-
- /* transform: rotateZ(180deg); */
-
- /* transform: rotate3d(x,y,z,deg); */
-
- /* transform: rotate3d(1, 0, 0, 45deg); */
-
- /* transform: rotate3d(0, 1, 0, 45deg); */
-
- transform: rotate3d(1, 1, 0, 45deg);
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <img src="media/pig.jpg" alt="">
·Controls whether the sub-element opens the 3D environment.
· Transform-style: flat sub-element does not open the 3D space default
·transform-style:preserve-3d; child elements open three-dimensional space
Code is written to the parent, but affects the child boxes
- body {
-
- perspective: 500px;
-
- }
-
-
-
- .box {
-
- position: relative;
-
- width: 200px;
-
- height: 200px;
-
- margin: 100px auto;
-
- transition: all 2s;
-
- /* 让子元素保持3d立体空间环境 */
-
- transform-style: preserve-3d;
-
- }
-
-
-
- .box:hover {
-
- transform: rotateY(60deg);
-
- }
-
-
-
- .box div {
-
- position: absolute;
-
- top: 0;
-
- left: 0;
-
- width: 100%;
-
- height: 100%;
-
- background-color: pink;
-
- }
-
-
-
- .box div:last-child {
-
- background-color: purple;
-
- transform: rotateX(60deg);
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <div class="box">
-
- <div></div>
-
- <div></div>
-
- </div>
1. Build HTML structure
<div class="box">
<div class="front">Dark Horse Programmer</div>
<div class="back">Teacher Pink is waiting for you</div>
</div>
The parent box contains two child boxes.
·box is the flipped box front is the front box back is the back box
- body {
-
- perspective: 400px;
-
- }
-
- .box {
-
- position: relative;
-
- width: 300px;
-
- height: 300px;
-
- margin: 100px auto;
-
- transition: all .4s;
-
- /* 让背面的紫色盒子保留立体空间 给父级添加的 */
-
- transform-style: preserve-3d;
-
- }
-
-
-
- .box:hover {
-
- transform: rotateY(180deg);
-
- }
-
-
-
- .front,
-
- .back {
-
- position: absolute;
-
- top: 0;
-
- left: 0;
-
- width: 100%;
-
- height: 100%;
-
- border-radius: 50%;
-
- font-size: 30px;
-
- color: #fff;
-
- text-align: center;
-
- line-height: 300px;
-
- }
-
- .front {
-
- background-color: pink;
-
- z-index: 1;
-
- }
-
-
-
- .back {
-
- background-color: purple;
-
- /* 像手机一样 背靠背 旋转 */
-
- transform: rotateY(180deg);
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <div class="box">
-
- <div class="front">黑马程序员</div>
-
- <div class="back">pink老师这里等你</div>
-
- </div>
- * {
-
- margin: 0;
-
- padding: 0;
-
- }
-
-
-
- ul {
-
- margin: 100px;
-
- }
-
-
-
- ul li {
-
- float: left;
-
- margin: 0 5px;
-
- width: 120px;
-
- height: 35px;
-
- list-style: none;
-
- /* 一会我们需要给box 旋转 也需要透视 干脆给li加 里面的子盒子都有透视效果 */
-
- perspective: 500px;
-
- }
-
-
-
- .box {
-
- position: relative;
-
- width: 100%;
-
- height: 100%;
-
- transform-style: preserve-3d;
-
- transition: all .4s;
-
- }
-
-
-
- .box:hover {
-
- transform: rotateX(90deg);
-
- }
-
-
-
- .front,
-
- .bottom {
-
- position: absolute;
-
- left: 0;
-
- top: 0;
-
- width: 100%;
-
- height: 100%;
-
- }
-
-
-
- .front {
-
- background-color: pink;
-
- z-index: 1;
-
- transform: translateZ(17.5px);
-
- }
-
-
-
- .bottom {
-
- background-color: purple;
-
- /* 这个x轴一定是负值 */
-
- /* 我们如果有移动 或者其他样式,必须先写我们的移动 */
-
- transform: translateY(17.5px) rotateX(-90deg);
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <ul>
-
- <li>
-
- <div class="box">
-
- <div class="front">黑马程序员</div>
-
- <div class="bottom">pink老师等你</div>
-
- </div>
-
- </li>
-
- <li>
-
- <div class="box">
-
- <div class="front">黑马程序员</div>
-
- <div class="bottom">pink老师等你</div>
-
- </div>
-
- </li>
-
- <li>
-
- <div class="box">
-
- <div class="front">黑马程序员</div>
-
- <div class="bottom">pink老师等你</div>
-
- </div>
-
- </li>
-
- <li>
-
- <div class="box">
-
- <div class="front">黑马程序员</div>
-
- <div class="bottom">pink老师等你</div>
-
- </div>
-
- </li>
-
- <li>
-
- <div class="box">
-
- <div class="front">黑马程序员</div>
-
- <div class="bottom">pink老师等你</div>
-
- </div>
-
- </li>
-
- <li>
-
- <div class="box">
-
- <div class="front">黑马程序员</div>
-
- <div class="bottom">pink老师等你</div>
-
- </div>
-
- </li>
-
- </ul>
- body {
-
- perspective: 1000px;
-
- }
-
-
-
- section {
-
- position: relative;
-
- width: 300px;
-
- height: 200px;
-
- margin: 150px auto;
-
- transform-style: preserve-3d;
-
- /* 添加动画效果 */
-
- animation: rotate 10s linear infinite;
-
- background: url(media/pig.jpg) no-repeat;
-
- }
-
-
-
- section:hover {
-
- /* 鼠标放入section 停止动画 */
-
- animation-play-state: paused;
-
- }
-
-
-
- @keyframes rotate {
-
- 0% {
-
- transform: rotateY(0);
-
- }
-
- 100% {
-
- transform: rotateY(360deg);
-
- }
-
- }
-
-
-
- section div {
-
- position: absolute;
-
- top: 0;
-
- left: 0;
-
- width: 100%;
-
- height: 100%;
-
- background: url(media/dog.jpg) no-repeat;
-
- }
-
- /* 正对着的图片 z轴*/
-
- section div:nth-child(1) {
-
- transform: rotateY(0) translateZ(300px);
-
- }
-
- /* 右边的图片 */
-
- section div:nth-child(2) {
-
- /* 先旋转好了再 移动距离 */
-
- transform: rotateY(60deg) translateZ(300px);
-
- }
-
-
-
- section div:nth-child(3) {
-
- /* 先旋转好了再 移动距离 */
-
- transform: rotateY(120deg) translateZ(300px);
-
- }
-
-
-
- section div:nth-child(4) {
-
- /* 先旋转好了再 移动距离 */
-
- transform: rotateY(180deg) translateZ(300px);
-
- }
-
-
-
- section div:nth-child(5) {
-
- /* 先旋转好了再 移动距离 */
-
- transform: rotateY(240deg) translateZ(300px);
-
- }
-
-
-
- section div:nth-child(6) {
-
- /* 先旋转好了再 移动距离 */
-
- transform: rotateY(300deg) translateZ(300px);
-
- }
-
- </style>
-
- </head>
-
-
- <body>
-
- <section>
-
- <div></div>
-
- <div></div>
-
- <div></div>
-
- <div></div>
-
- <div></div>
-
- <div></div>
-
- </section>
-moz-: represents the private properties of the Firefox browser
-ms-: represents the private properties of IE browser
-webkit-: represents Safari and Chrome private attributes
-o-: represents Opera private attributes
2. Recommended writing style
-moz-border-radius:10px;
-webkit-border-radius:10px;
-o-border-radius:10px;border-radius:10px;