Created
May 28, 2014 12:20
-
-
Save emilbjorklund/9cd72554ac38eb801099 to your computer and use it in GitHub Desktop.
Scalebar
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
/** | |
* Scalebar | |
* I need to rotate the image in place, without pushing content down or overlapping. | |
* Is there anyway to do this in CSS? | |
*/ | |
.wrap { | |
float: left; | |
} | |
.scalebar { | |
transform: rotate(-90deg); | |
transform-origin: 50% 0; | |
position: relative; | |
margin-bottom: -100%; | |
} |
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
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sollicitudin mattis nibh, in luctus leo aliquet ut. Etiam nibh erat, vehicula ut lacus sed, ultrices ornare mauris. Donec semper ipsum a lobortis congue. Maecenas vel elit non tortor varius feugiat nec ac sapien. Curabitur sed ligula consectetur, ultrices nisl eu, adipiscing ligula. Ut ultrices ante quis aliquam feugiat. Curabitur vel euismod risus, commodo cursus mauris. Curabitur accumsan risus eget consectetur pellentesque.</p> | |
<div class="wrap"><img class="scalebar" src="http://earthserver.pml.ac.uk/thredds/wms/CEFAS/resoutcut.nc?REQUEST=GetLegendGraphic&LAYER=Cod__adult_&COLORSCALERANGE=null,null&logscale=false&colorbaronly=true&WIDTH=25&HEIGHT=100"></div> | |
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sollicitudin mattis nibh, in luctus leo aliquet ut. Etiam nibh erat, vehicula ut lacus sed, ultrices ornare mauris. Donec semper ipsum a lobortis congue. Maecenas vel elit non tortor varius feugiat nec ac sapien. Curabitur sed ligula consectetur, ultrices nisl eu, adipiscing ligula. Ut ultrices ante quis aliquam feugiat. Curabitur vel euismod risus, commodo cursus mauris. Curabitur accumsan risus eget consectetur pellentesque.</p> |
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
// alert('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
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment