css实现三角形标

 .iszb{
    position: absolute;top: -75px;right:-75px;text-align: center;color: red;
    width: 150px;height: 150px;background-color: yellow;font-size: 26px;font-weight: bold; line-height: 250px;
    transform:rotate(45deg);-o-transform:rotate(45deg);-moz-transform:rotate(45deg);-webkit-transform:rotate(45deg);
}

实现右上角三角,父元素需要加上overflow:hidden;

猜你喜欢

转载自www.cnblogs.com/chenlw/p/9259494.html