text on the top of an image
问题 I want to center some text in two corners of an image, one in the top left and other in the top right. Something like this: .left, .right { width: 300px; height: 200px; float: left; } .left-div, .right-div { position: relative; } .left-text, .right-text { position: absolute; top: 0; left: 0; z-index: 999; background-color: black; color: white; padding: 5px; } .left { float: left; } .right { float: right; } .rotate-left { -moz-transform: translateX(-50%) translateY(-50%) rotate(-90deg);