以下技巧均源自于Lea Verou所著《CSS Secrets》

半透明边框

  按照常规的思维,我们在添加半透明的边框时无非是将边框颜色设置一个透明度,如下:

大学生就业培训,高中生培训,在职人员转行培训,企业团训

 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4     <meta charset="UTF-8"> 5     <title>Title</title> 6     <style> 7         .outerBox{ 8             position: relative; 9             width: 400px;10             height: 400px;11             background-color: aqua;12         }13         .innerBox{14             position: absolute;15             top: 0;16             bottom: 0;17             left: 0;18             right: