the_gundersons
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
the_gundersons [2020/01/08 15:25] – created andrew | the_gundersons [2020/01/08 16:07] (current) – andrew | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== The Gundersons ====== | ====== The Gundersons ====== | ||
- | < | ||
- | < | ||
- | /*Now the CSS*/ | ||
- | * {margin: 0; padding: 0;} | ||
- | .tree ul { | + | < |
- | padding-top: 20px; position: relative; | + | <iframe src=" |
- | + | </HTML> | |
- | transition: | + | |
- | -webkit-transition: | + | |
- | -moz-transition: | + | |
- | } | + | |
- | + | ||
- | .tree li { | + | |
- | float: left; text-align: center; | + | |
- | list-style-type: | + | |
- | position: relative; | + | |
- | padding: 20px 5px 0 5px; | + | |
- | + | ||
- | transition: | + | |
- | -webkit-transition: | + | |
- | -moz-transition: | + | |
- | } | + | |
- | + | ||
- | /*We will use ::before and ::after to draw the connectors*/ | + | |
- | + | ||
- | .tree li::before, .tree li:: | + | |
- | content: ''; | + | |
- | position: absolute; top: 0; right: 50%; | + | |
- | border-top: | + | |
- | width: 50%; height: 20px; | + | |
- | } | + | |
- | .tree li:: | + | |
- | right: auto; left: 50%; | + | |
- | border-left: | + | |
- | } | + | |
- | + | ||
- | /*We need to remove left-right connectors from elements without | + | |
- | any siblings*/ | + | |
- | .tree li: | + | |
- | display: none; | + | |
- | } | + | |
- | + | ||
- | /*Remove space from the top of single children*/ | + | |
- | .tree li: | + | |
- | + | ||
- | /*Remove left connector from first child and | + | |
- | right connector from last child*/ | + | |
- | .tree li: | + | |
- | border: | + | |
- | } | + | |
- | /*Adding back the vertical connector to the last nodes*/ | + | |
- | .tree li:last-child:: | + | |
- | border-right: | + | |
- | border-radius: | + | |
- | -webkit-border-radius: | + | |
- | -moz-border-radius: | + | |
- | } | + | |
- | .tree li: | + | |
- | border-radius: | + | |
- | -webkit-border-radius: | + | |
- | -moz-border-radius: | + | |
- | } | + | |
- | + | ||
- | /*Time to add downward connectors from parents*/ | + | |
- | .tree ul ul:: | + | |
- | content: ''; | + | |
- | position: absolute; top: 0; left: 50%; | + | |
- | border-left: | + | |
- | width: 0; height: | + | |
- | } | + | |
- | + | ||
- | .tree li a{ | + | |
- | border: 1px solid #ccc; | + | |
- | padding: 5px 10px; | + | |
- | text-decoration: | + | |
- | color: #666; | + | |
- | font-family: | + | |
- | font-size: 11px; | + | |
- | display: inline-block; | + | |
- | + | ||
- | border-radius: | + | |
- | -webkit-border-radius: | + | |
- | -moz-border-radius: | + | |
- | + | ||
- | transition: | + | |
- | -webkit-transition: | + | |
- | -moz-transition: | + | |
- | } | + | |
- | + | ||
- | /*Time for some hover effects*/ | + | |
- | /*We will apply the hover effect the the lineage of the element also*/ | + | |
- | .tree li a:hover, .tree li a:hover+ul li a { | + | |
- | background: | + | |
- | } | + | |
- | /*Connector styles on hover*/ | + | |
- | .tree li a:hover+ul li::after, | + | |
- | .tree li a:hover+ul li::before, | + | |
- | .tree li a: | + | |
- | .tree li a:hover+ul ul:: | + | |
- | border-color: | + | |
- | } | + | |
- | + | ||
- | /*Thats all. I hope you enjoyed it. | + | |
- | Thanks :)*/ | + | |
- | </ | + | |
- | <div class=" | + | |
- | < | + | |
- | < | + | |
- | <a href="# | + | |
- | < | + | |
- | < | + | |
- | <a href="#"> | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | < | + | |
- | <a href="#"> | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | + | ||
- | + | ||
- | </html> | + |
the_gundersons.1578497147.txt.gz · Last modified: 2020/01/08 15:25 by andrew