edwardtufte / tufte-css

Style your webpage like Edward Tufte’s handouts.
https://edwardtufte.github.io/tufte-css/
MIT License
5.98k stars 458 forks source link

put img src in right margin and popup span in center? #129

Closed cywhale closed 6 years ago

cywhale commented 6 years ago

Can I enlarge an right-margin-image to its original size in the center of browser when mouse hover? Position:absolute (in the following) cannot work in tufte style. The span is always pop-up and restricted in the right margin. Thanks for the help.

<style>
....
.thumbnail:span
  position:absolute;
  margin:0 auto;
  width: 100%;
  visibility: hidden;
}
.thumbnail:hover span
  visibility: visible; 
}
</style>
<a class="thumbnail">
<img src="img/xxx_thumbnail.png"><span><img src="img/xxx.png"></span></a>
cywhale commented 6 years ago

I found an alternative way to do that.