Team:UCL/Template:SCJtooltip.css

From 2014.igem.org

(Difference between revisions)
 
(5 intermediate revisions not shown)
Line 1: Line 1:
-
.tipr_content
+
[data-tip],
-
{
+
[data-tip]:before,
-
    font: 13px/1.7 'Helvetica Neue', Helvetica, Arial, sans-serif;
+
[data-tip]:after {
-
    color: #333;
+
  -webkit-box-sizing: border-box;
-
    background-color: #fff;
+
  -moz-box-sizing: border-box;
-
    color: #333;
+
  box-sizing: border-box;
-
    padding: 9px 17px;
+
}
}
-
.tipr_container_bottom
+
[data-tip] {
-
{
+
  position: relative;
-
    display: none;
+
-
    position: absolute;
+
-
    margin-top: 13px;
+
-
    z-index: 1000;
+
}
}
-
.tipr_container_top
+
[data-tip]:hover:before,
-
{
+
[data-tip].show:before {
-
    display: none;
+
  font-size: 16px;
-
    position: fixed;
+
  content: attr(data-tip-content);
-
    margin-top: -75px;
+
  display: block;
-
    z-index: 1000;
+
  position: absolute;
 +
  background: #555555;
 +
  color: #ffffff;
 +
  text-align: center;
 +
  border-radius: 5px 5px 5px 5px;
 +
  padding: 5px 5px 5px 5px;
 +
  z-index: 9999;
}
}
-
.tipr_point_top, .tipr_point_bottom
+
[data-tip]:hover:after,
-
{
+
[data-tip].show:after {
-
    position: relative;
+
  content: "";
-
background: #fff;
+
  position: absolute;
-
border: 1px solid #dcdcdc;
+
  display: block;
 +
  z-index: 1;
}
}
-
.tipr_point_top:after, .tipr_point_top:before
+
[data-tip]:hover:before,
-
{
+
[data-tip].show:before,
-
position: absolute;
+
[data-tip]:hover:after,
-
pointer-events: none;
+
[data-tip].show:after {
-
border: solid transparent;
+
  -webkit-transition: all 0.5s ease 0s;
-
top: 100%;
+
  transition: all 0.5s ease 0s;
-
content: "";
+
  -webkit-animation: fadeIn 0.5s;
-
height: 0;
+
  animation: fadeIn 0.5s;
-
width: 0;
+
}
}
-
.tipr_point_top:after
+
[data-tip].top:before,
-
{
+
[data-tip].bottom:before {
-
border-top-color: #fff;
+
  left: 50%;
-
border-width: 8px;
+
  width: 150px;
-
left: 50%;
+
  margin-left: -75px;
-
margin-left: -8px;
+
}
}
-
.tipr_point_top:before  
+
[data-tip].top.small:before,
-
{
+
[data-tip].bottom.small:before {
-
border-top-color: #dcdcdc;
+
  width: 75px;
-
border-width: 9px;
+
  margin-left: -37.5px;
-
left: 50%;
+
-
margin-left: -9px;
+
}
}
-
.tipr_point_bottom:after, .tipr_point_bottom:before
+
[data-tip].top.large:before,
-
{
+
[data-tip].bottom.large:before {
-
position: absolute;
+
  width: 300px;
-
pointer-events: none;
+
  margin-left: -150px;
-
border: solid transparent;
+
-
bottom: 100%;
+
-
content: "";
+
-
height: 0;
+
-
width: 0;
+
}
}
-
.tipr_point_bottom:after
+
[data-tip].top:before {
-
{
+
  bottom: 100%;
-
border-bottom-color: #fff;
+
  margin-bottom: 12px;
-
border-width: 8px;
+
-
left: 50%;
+
-
margin-left: -8px;
+
}
}
-
.tipr_point_bottom:before  
+
[data-tip].bottom:before {
-
{
+
  top: 100%;
-
border-bottom-color: #dcdcdc;
+
  margin-top: 12px;
-
border-width: 9px;
+
-
left: 50%;
+
-
margin-left: -9px;
+
}
}
-
.cf:before,
+
[data-tip].top:after,
-
.cf:after {
+
[data-tip].bottom:after {
-
    content: " "; /* 1 */
+
  left: 50%;
-
    display: table; /* 2 */
+
  margin-left: -12px;
 +
  border: 12px solid transparent;
}
}
-
 
+
[data-tip].top:after {
-
.cf:after {
+
  bottom: 100%;
-
    clear: both;
+
  margin-bottom: -12px;
 +
  border-top: 12px solid #555555;
}
}
-
.infoBlock1 .tipr_container_top {  
+
[data-tip].bottom:after {
-
  margin-top: -230px;
+
  top: 100%;
 +
  margin-top: -12px;
 +
  border-bottom: 12px solid #555555;
 +
}
 +
[data-tip].right:before,
 +
[data-tip].left:before {
 +
  top: 50%;
 +
  width: 150px;
 +
  height: 40px;
 +
  margin-top: -20px;
 +
}
 +
[data-tip].right.small:before,
 +
[data-tip].left.small:before {
 +
  width: 75px;
 +
  height: 20px;
 +
  margin-top: -10px;
 +
}
 +
[data-tip].right.large:before,
 +
[data-tip].left.large:before {
 +
  width: 300px;
 +
  height: 100px;
 +
  margin-top: -50px;
 +
}
 +
[data-tip].right:before {
 +
  left: 100%;
 +
  margin-left: 12px;
 +
}
 +
[data-tip].left:before {
 +
  right: 100%;
 +
  margin-right: 12px;
 +
}
 +
[data-tip].right:after,
 +
[data-tip].left:after {
 +
  top: 50%;
 +
  margin-top: -12px;
 +
  border: 12px solid transparent;
 +
}
 +
[data-tip].right:after {
 +
  left: 100%;
 +
  margin-left: -12px;
 +
  border-right: 12px solid #555555;
 +
}
 +
[data-tip].left:after {
 +
  right: 100%;
 +
  margin-right: -12px;
 +
  border-left: 12px solid #555555;
 +
}
 +
@-webkit-keyframes fadeIn {
 +
  from {
 +
    opacity: 0;
 +
  }
 +
  to {
 +
    opacity: 1;
 +
  }
 +
}
 +
@keyframes fadeIn {
 +
  from {
 +
    opacity: 0;
 +
  }
 +
  to {
 +
    opacity: 1;
 +
  }
}
}

Latest revision as of 14:15, 16 October 2014

[data-tip], [data-tip]:before, [data-tip]:after {

 -webkit-box-sizing: border-box;
 -moz-box-sizing: border-box;
 box-sizing: border-box;

} [data-tip] {

 position: relative;

} [data-tip]:hover:before, [data-tip].show:before {

 font-size: 16px;
 content: attr(data-tip-content);
 display: block;
 position: absolute;
 background: #555555;
 color: #ffffff;
 text-align: center;
 border-radius: 5px 5px 5px 5px;
 padding: 5px 5px 5px 5px;
 z-index: 9999;

} [data-tip]:hover:after, [data-tip].show:after {

 content: "";
 position: absolute;
 display: block;
 z-index: 1;

} [data-tip]:hover:before, [data-tip].show:before, [data-tip]:hover:after, [data-tip].show:after {

 -webkit-transition: all 0.5s ease 0s;
 transition: all 0.5s ease 0s;
 -webkit-animation: fadeIn 0.5s;
 animation: fadeIn 0.5s;

} [data-tip].top:before, [data-tip].bottom:before {

 left: 50%;
 width: 150px;
 margin-left: -75px;

} [data-tip].top.small:before, [data-tip].bottom.small:before {

 width: 75px;
 margin-left: -37.5px;

} [data-tip].top.large:before, [data-tip].bottom.large:before {

 width: 300px;
 margin-left: -150px;

} [data-tip].top:before {

 bottom: 100%;
 margin-bottom: 12px;

} [data-tip].bottom:before {

 top: 100%;
 margin-top: 12px;

} [data-tip].top:after, [data-tip].bottom:after {

 left: 50%;
 margin-left: -12px;
 border: 12px solid transparent;

} [data-tip].top:after {

 bottom: 100%;
 margin-bottom: -12px;
 border-top: 12px solid #555555;

} [data-tip].bottom:after {

 top: 100%;
 margin-top: -12px;
 border-bottom: 12px solid #555555;

} [data-tip].right:before, [data-tip].left:before {

 top: 50%;
 width: 150px;
 height: 40px;
 margin-top: -20px;

} [data-tip].right.small:before, [data-tip].left.small:before {

 width: 75px;
 height: 20px;
 margin-top: -10px;

} [data-tip].right.large:before, [data-tip].left.large:before {

 width: 300px;
 height: 100px;
 margin-top: -50px;

} [data-tip].right:before {

 left: 100%;
 margin-left: 12px;

} [data-tip].left:before {

 right: 100%;
 margin-right: 12px;

} [data-tip].right:after, [data-tip].left:after {

 top: 50%;
 margin-top: -12px;
 border: 12px solid transparent;

} [data-tip].right:after {

 left: 100%;
 margin-left: -12px;
 border-right: 12px solid #555555;

} [data-tip].left:after {

 right: 100%;
 margin-right: -12px;
 border-left: 12px solid #555555;

} @-webkit-keyframes fadeIn {

 from {
   opacity: 0;
 }
 to {
   opacity: 1;
 }

} @keyframes fadeIn {

 from {
   opacity: 0;
 }
 to {
   opacity: 1;
 }

}