css布局实现多种折纸效果代码
代码语言:html
所属分类:布局界面
代码描述:css布局实现多种折纸效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body{ background-color:lightgray; } .container{ margin-top: 50px; z-index:0; display:flex; flex-direction: row; flex-wrap: wrap; } .square1 { height:200px; width:200px; clip-path: polygon(0% 0%, 0% 100%, 100% 100%, 100% 0%); margin-left: 90px; background: rgba(132,8,8,1); position:relative; z-index: 0; } .square2 { height:200px; width:200px; clip-path: polygon(0% 0%, 0% 100%, 100% 100%, 100% 0%); margin-left: 90px; transform:rotate(45deg); background: linear-gradient(-45deg, rgba(132,8,8,1) 46%, rgba(166,12,12,1) 49.5%, rgba(92,6,6,1) 49.9%, rgba(132,8,8,1) 50%, rgba(92,6,6,1) 50.5%, rgba(132,8,8,1) 56%); position:relative; z-index: 0; } .square3 { height:200px; width:200px; clip-path: polygon(0% 0%, 0% 100%, 100% 100%, 100% 0%); margin-left: 90px; transform:rotate(45deg); background: linear-gradient(45deg, rgba(132,8,8,.2) 46%, rgba(166,12,12,.2) 49.5%, rgba(92,6,6,.2) 49.9%, rgba(132,8,8,.2) 50%, rgba(92,6,6,.2) 50.5%, rgba(132,8,8,.2) 56%), linear-gradient(-45deg, rgba(132,8,8,1) 46%, rgba(166,12,12,1) 49.5%, rgba(92,6,6,1) 49.9%, rgba(132,8,8,1) 50%, rgba(92,6,6,1) 50.5%, rgba(132,8,8,1) 56%); position:rel.........完整代码请登录后点击上方下载按钮下载查看
网友评论0