css实现边角装饰丝带效果代码
代码语言:html
所属分类:布局界面
代码描述:css实现边角装饰丝带效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> html { background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#a9aead), to(#c5cdcf)); background: -webkit-linear-gradient(top, #c5cdcf, #a9aead); background: -moz-linear-gradient(top, #c5cdcf, #a9aead); min-height: 100%; } h1 { font: bold 35px Sans-Serif; text-transform: uppercase; color: #fff; text-align: center; text-shadow: 0 0 15px rgba(0, 0, 0, 0.2); } .card-wrap { text-align: center; } .card { width: 400px; height: 500px; position: relative; background: #fff; overflow: visible; margin: 20px; box-shadow: 0 0 15px rgba(0, 0, 0, 0.1); display: inline-block; } .set-image { width: 100%; height: 50%; background: #eee; overflow: hidden; font: bold 20px Sans-Serif; text-transform: uppercase; display: table; } .set-image p { display: table-cell; vertical-align: middle; text-align: center; line-height: 25px; color: #d2d2d2; } .set-headline { width: 65%; height: 10%; background: #eee; margin: 20px; } .set-text { width: 90%; height: 12px; background: #eee; margin: 12px 20px; } .ribbon-wrapper-1 { width: 106px; height: 108px; overflow: hidden; position: absolute; top: -6px; right: -6px; } .ribbon-1 { font: bold 15px Sans-Serif; line-height: 18px; color: #333; text-align: center; text-transform: uppercase; -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); position: relative; padding: 7px 0; left: -11px; top: 26px; width: 150px; background-color: #6daaab; color: #fff; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); letter-spacing: 0.5px; } .ribbon-1:before, .ribbon-1:after { content: ""; border-top: 4px solid #4e7c7d; border-left: 4px solid transparent; border-right: 4px solid transparent; position: absolute; bottom: -4px; } .ribbon-1:before { left: 0; } .ribbon-1:after { right: 0; } .ribbon-wrapper-2 { width: 108px; height: 108px; overflow: hidden; position: absolute; top: -6px; right: -6px; } .ribbon-2 { font: bold 15px Sans-Serif; line-height: 18px; color: #333; text-align: center; text-transform: uppercase; -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); position: relative; padding: 7px 0; left: -4px; top: 26px; width: 150px; background-color: #6daaab; color: #fff; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); letter-spacing: 0.5px; box-shadow: -3px 5px 6px -5px rgba(0, 0, 0, 0.5); } .ribbon-2:before, .ribbon-2:after { content: ""; border-top: 4px solid #4e7c7d; border-left: 4px solid transparent; border-right: 4px solid transparent; position: absolute; bottom: -4px; } .ribbon-2:before { content: ""; position: absolute; left: 0px; top: 100%; z-index: -1; border-left: 4px solid #4e7c7d; border-right: 4px solid transparent; border-bottom: 4px solid transparent; border-top: 4px solid #4e7c7d; } .ribbon-2:after { content: ""; position: absolute; right: 7px; top: 100%; z-index: -1; border-left: 4px solid transparent; border-right: 4px solid #4e7c7d; border-bottom: 4px solid transparent; border-top: 4px solid #4e7c7d; } .ribbon-wrapper-3 { width: 106px; height: 108px; overflow: hidden; position: absolute; top: -6px; left: -6px; } .ribbon-3 { font: bold 15px Sans-Serif; line-height: 18px; color: #333; text-align: center; text-transform: uppercase; -webkit-transform: rotate(-45deg); -moz-transform: rotate(-45deg); -ms-transform: rotate(-45deg); -o-transform: rotate(-45deg); position: relative; padding: 7px 0; left: -33px; top: 26px; width: 150px; background-color: #6daaab; color: #fff; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); letter-spacing: 0.5px; } .ribbon-3:before, .ribbon-3:after { content: ""; border-top: 4px solid #4e7c7d; border-left: 4px solid transparent; border-right: 4px solid transparent; position: absolute; bottom: -4px; } .ribbon-3:before { left: 0; } .ribbon-3:after { right: 0; } .ribbon-wrapper-4 { width: 108px; height: 108px; overflow: hidden; position: absolute; top: -6px; right: -6px; } .ribbon-4 { font: bold 15px Sans-Serif; line-height: 18px; color: #333; text-align: center; text-transform: uppercase; -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); position: relative; padding: 7px 0; left: -4px; top: 26px; width: 150px; background-color: #6daaab; color: #fff; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); letter-spacing: 0.5px; background-image: linear-gradient(#6daaab, #4e7c7d); box-shadow: -3px 5px 6px -5px rgba(0, 0, 0, 0.5); text-shadow: 0px 0px 5px rgba(0, 0, 0, 0.4); } .ribbon-4:before, .ribbon-4:after { content: ""; border-top: 4px solid #4e7c7d; border-left: 4px solid transparent; border-right: 4px solid transparent; position: absolute; bottom: -4px; } .ribbon-4:before { content: ""; position: absolute; left: 0px; top: 100%; z-index: -1; border-left: 4px solid #4e7c7d; border-right: 4px solid transparent; border-bottom: 4px solid transparent; border-top: 4px solid #4e7c7d; } .ribbon-4:after { content: ""; position: absolute; right: 7px; top: 100%; z-index: -1; border-left: 4px solid transparent; border-right: 4px solid #4e7c7d; border-bottom: 4px solid transparent; border-top: 4px solid #4e7c7d; } .ribbon-wrapper-5 { width: 108px; height: 108px; overflow: hidden; position: absolute; top: -6px; right: -6px; } .ribbon-5 { font: bold 15px Sans-Serif; line-height: 18px; color: #333; text-align: center; text-transform: uppercase; -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); position: relative; padding: 7px 0; left: -4px; top: 26px; width: 150px; background-color: #6daaab; color: #fff; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); letter-spacing: 0.5px; background-image: radial-gradient(circle farthest-side, #6daaab, #4e7c7d); box-shadow: -3px 5px 6px -5px rgba(0, 0, 0, 0.5); text-shadow: 0px 0px 5px rgba(0, 0, 0, 0.4); } .ribbon-5:before, .ribbon-5:after { content: ""; border-top: 4px solid #4e7c7d; border-left: 4px solid transparent; border-right: 4px solid transparent; position: absolute; bottom: -4px; } .ribbon-5:before { content: ""; position: absolute; left: 0px; top: 100%; z-index: -1; border-left: 4px solid #4e7c7d; border-right: 4px solid transparent; border-bottom: 4px solid transparent; border-top: 4px solid #4e7c7d; } .ribbon-5:after { content: ""; position: absolute; right: 7px; top: 100%; z-index: -1; border-left: 4px solid transparent; border-right: 4px solid #4e7c7d; border-bottom: 4px solid transparent; border-top: 4px solid #4e7c7d; } .ribbon-wrapper-6 { width: 108px; height: 108px; overflow: hidden; position: absolute; top: -6px; right: -6px; } .ribbon-6 { font: bold 15px Sans-Serif; line-height: 18px; color: #333; text-align: center; text-transform: uppercase; -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); position: relative; padding: 7px 0; left: -4px; top: 26px; width: 150px; background-color: #6daaab; color: #fff; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); letter-spacing: 0.5px; background-image: linear-gradient(#4e7c7d -50%, #6daaab 50%, #6daaab 0%, #4e7c7d 150%); text-shadow: 0px 0px 5px rgba(0, 0, 0, 0.4); box-shadow: -3px 5px 6px -5px rgba(0, 0, 0, 0.5); } .ribbon-6:before, .ribbon-6:after { content: ""; border-top: 4px solid #4e7c7d; border-left: 4px solid transparent; border-right: 4px solid transparent; position: absolute; bottom: -4px; } .ribbon-6:before { content: ""; position: absolute; left: 0px; top: 100%; z-index: -1; border-left: 4px solid #4e7c7d; border-right: 4px solid transparent; border-bottom: 4px solid transparent; border-top: 4px solid #4e7c7d; } .ribbon-6:after { content: ""; position: absolute; right: 7px; top: 100%; z-index: -1; border-left: 4px solid transparent; border-right: 4px solid #4e7c7d; border-bottom: 4px solid transparent; border-top: 4px solid #4e7c7d; } .ribbon-wrapper-7 { width: 108px; height: 108px; overflow: hidden; position: absolute; top: -6px; right: -6px; } .ribbon-7 { font: bold 15px Sans-Serif; line-height: 18px; color: #333; text-align: center; text-transform: uppercase; -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); position: relative; padding: 7px 0; left: -4px; top: 26px; width: 150px; background-color: #6daaab; color: #fff; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); letter-spacing: 0.5px; box-shadow: -3px 5px 6px -5px rgba(0, 0, 0, 0.5); outline: 1px solid #fff; outline-offset: -4px; } .ribbon-7:before, .ribbon-7:after { content: ""; border-top: 4px solid #4e7c7d; border-left: 4px solid transparent; border-right: 4px solid transparent; position: absolute; b.........完整代码请登录后点击上方下载按钮下载查看
网友评论0