导航

CSS的background

Posted on 2018-05-08 10:46  小飞博客  阅读(127)  评论(0编辑  收藏  举报
 1 .block{
 2   width: 200px;
 3   height: 200px;
 4   padding: 25px;
 5   background-image:linear-gradient(#58a,#58a)
 6     ,linear-gradient(to left,#0292f3 33.3%,transparent 0,transparent 66.6%  , #0292f3 0)
 7     ,linear-gradient(#0292f3 33.3%,transparent 0,transparent 66.6%  , #0292f3 0)
 8     ,linear-gradient(to right,#0292f3 33.3%,transparent 0,transparent 66.6%  , #0292f3 0)
 9     ,linear-gradient(to bottom,#0292f3 33.3%,transparent 0,transparent 66.6%  , #0292f3 0);
10      background-clip: content-box,border-box,border-box,border-box,border-box;
11     background-position: 0 0,0 0,100% 0,0 100%,0;
12     background-size: 100%,100% 5px,5px 100%,100% 5px,5px 100%;
13     background-repeat: repeat,no-repeat,no-repeat,no-repeat,no-repeat; 
14 }