This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* margin collapse | |
*/ | |
ul { | |
background: red; | |
} | |
ul li{ | |
list-style-type: none; | |
width: 40px; | |
height: 20px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* margin collapse | |
*/ | |
ul { | |
background: red; | |
clear: both; | |
//overflow: hidden; | |
//border: 1px solid; | |
} | |
ul li{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* three column absolute | |
*/ | |
.wrapper { | |
position: relative; | |
} | |
.left { | |
width: 200px; | |
height: 200px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* equal height column | |
*/ | |
.parent { | |
border: 1px solid; | |
float: left; | |
overflow: hidden; | |
} | |
.child { | |
float: left; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* equal height column | |
*/ | |
.wrapper { | |
border: 1px solid; | |
float: left; | |
} | |
.child { | |
background: grey; | |
float: left; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* vertical-align | |
*/ | |
.test1 { | |
border: 1px solid; | |
//line-height: 0; | |
} | |
img { | |
vertical-align: baseline; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* line-height value | |
*/ | |
p, div { | |
border: 1px solid; | |
margin: 10px; | |
} | |
h3 { | |
font-size: 20px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* box-shadow | |
*/ | |
div { | |
height: 30px; | |
background: lightgrey; | |
margin: 0 auto; | |
width: 300px; | |
//box-shadow: inset 2px 0 red, inset -2px 0 red, inset 0 -2px red; | |
box-shadow: inset 2px 2px green, inset -2px -2px red; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* line-height and font-size | |
*/ | |
.test1 { | |
font-size: 0; | |
line-height: 24px; | |
border: 1px solid; | |
background: grey; | |
} | |
.test2 { |
NewerOlder