《css 揭秘》

by Fannie

HTML

<div class='div0'>
  背景定位
</div>

CSS

body {
	background: #000;
}

.div0 {
  background: url(http://csssecrets.io/images/code-pirate.svg)
	            no-repeat bottom right green;
	background-position: calc(100% - 20px)  calc(100% - 10px);
	max-width: 10em;
	min-height: 5em;
	padding: 10px;
	color: white;
	font: 100%/1 sans-serif;
}