Using the Bootstrap media feature, how can I place a badge in the lower right of the media block's image (so it's on top of the image)?
相关问题
- Adding a timeout to a render function in ReactJS
-
Why does the box-shadow property not apply to a
- How to add a “active” class to a carousel first el
- Add animation to jQuery function Interval
- jQuery hover to slide?
Hard to tell what you want exactly without having seen your code, but I gave it a shot anyway:
HTML
CSS
I prefer using absolute positioning when thing have to be aligned relative to the bottom and/or right, as it is the easiest and most reliable method imo.
A demo: http://www.bootply.com/suRioyheqL
With such a markup :
You have your badge at the bottom right of the image, but under. If you want it to be a bit over the image, add this css :
See this Fiddle : http://jsfiddle.net/d7kXX/
But obviously you can place it wherever you want. If you want it entierly over, try this :
http://jsfiddle.net/6cME7/
FYI, If you resize it breaks the badge size. I guess it gives a general idea but i think it is not fully functionnal.