html - Adding chamfer to box using CSS3 -
html - Adding chamfer to box using CSS3 -
i'm building project website our compound, , right i'm building news-feed landingpage.
earlier, news-feed boxes (its divided 3 boxes/row) genuine text; involves both text , images. earlier, utilize css gradients create requested effect. problem lies in can't seem work image-backgrounds.
i have tried solve problem using image-borders, didn't work due fact needs transparent matches body-background still covering image-background.
my question follows: can create requested chamfer effect on news-feed boxes work never-regarding what's background of body or if it's image/genuine text?
please take @ jsfiddle understand effect first text-only box has , want sec image/text-box; http://jsfiddle.net/pm6hqtxq/1/
code chamfer:
background:linear-gradient(135deg, transparent 20px, #333333 0) top left, linear-gradient(0deg, transparent 0px, #333333 0) top right, linear-gradient(0deg, transparent 0px, #333333 0) bottom right, linear-gradient(0deg, transparent 0px, #333333 0) bottom left;
thanks, tommie
here css way it.
fiddle here
background: #c00; /* fallback */ background: -moz-linear-gradient(45deg, transparent 15px, #c00 10px), -moz-linear-gradient(135deg, transparent 15px, #c00 10px), -moz-linear-gradient(225deg, transparent 15px, #c00 10px), -moz-linear-gradient(315deg, transparent 15px, #c00 10px); background: -o-linear-gradient(45deg, transparent 15px, #c00 10px), -o-linear-gradient(135deg, transparent 15px, #c00 10px), -o-linear-gradient(225deg, transparent 15px, #c00 10px), -o-linear-gradient(315deg, transparent 15px, #c00 10px); background: -webkit-linear-gradient(45deg, transparent 15px, #c00 10px), -webkit-linear-gradient(135deg, transparent 15px, #c00 10px), -webkit-linear-gradient(225deg, transparent 15px, #c00 10px), -webkit-linear-gradient(315deg, transparent 15px, #c00 10px); }
html css css3 twitter-bootstrap
Comments
Post a Comment