Difference between revisions of "Useful Mixins"

From rbachwiki
Jump to navigation Jump to search
Line 1: Line 1:
== Create Full Background Image ==
== Create Full Background Image ==
<pre>
<pre>
@mixin backImage($url, $repeat: no-repeat,
@mixin backImage($url, $repeat: no-repeat, $origin:border-box, $position:center center, $size:cover)
$origin:border-box,
{
  $position:center center,
  $size:cover){
// url, no-repeat, border-box|content-box, center center
// url, no-repeat, border-box|content-box, center center

Revision as of 13:27, 23 September 2016

Create Full Background Image

@mixin backImage($url, $repeat: no-repeat, $origin:border-box,  $position:center center, $size:cover)
{
	// url, no-repeat, border-box|content-box, center center
	
	background-image:url($url);
	background-repeat: $repeat;
	background-origin: $origin;
	background-position: $position;
	-webkit-background-size: $size; 
	-o-background-size: $size; 
	background-size: $size; 
}

Back To Top- Home - Category