Codrops Playground

#cssref mask-border-outset by SaraSoueidan

HTML

7
 
1
<div class="container">
2
3
  <div class="element">
4
    <img src="http://tympanus.net/codrops-playground/assets/images/cssref/properties/mask-border-outset/sleepy-owl.jpg" alt="">
5
  </div>
6
  <p><strong>You should read more about how the different border image properties work together in the <a href="http://tympanus.net/codrops/css_reference/mask-border"><code>mask-border</code></a> shorthand property entry</strong>.</p>
7
</div>

CSS

29
 
1
body {
2
  color: #555;
3
  font-size: 1.1em;
4
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
5
}
6
7
.container {
8
  margin: 40px auto;
9
  max-width: 700px;
10
}
11
12
.element {
13
  border: 5px solid #ddd;
14
  -webkit-mask-border-source: url(http://tympanus.net/codrops-playground/assets/images/cssref/properties/mask-border-outset/mask-border-image.png);
15
  mask-border-source: url(http://tympanus.net/codrops-playground/assets/images/cssref/properties/mask-border-outset/mask-border-image.png);
16
  -webkitmask-border-repeat: round;
17
  mask-border-repeat: round;
18
  -webkit-mask-border-width: 27px;
19
  mask-border-width: 27px;
20
  -webkit-mask-border-slice: 27;
21
  mask-border-slice: 27;
22
  -webkit-mask-border-outset: 20px;
23
  mask-border-outset: 20px;
24
}
25
26
img {
27
  width: 100%;
28
  display: block;
29
}

JS

1
 
1

#cssref mask-border-outset

by SaraSoueidan on

Demo for the Codrops CSS Reference entry mask-border-outset

Codrops Logo Codrops Playground

Version 0.0.9 (alpha)

Codrops Playground is currently in development with many features to come, including mobile support. We are in alpha stage right now, so if you find a bug, please send a mail to playground@codrops.com or use the contact form on Codrops.

If you'd like to stay updated, follow us on Twitter @codrops. Thank you and stay tuned :)