Making all photos square via css

后端 未结 6 2160
忘掉有多难
忘掉有多难 2021-02-07 06:50

I\'m trying to make a series of photos into square photos. They may be rectangular horizontally (i.e. 600x400) or vertically (400x600), but I want to get them to be 175x175 eit

6条回答
  •  忘掉有多难
    2021-02-07 06:57

    Determine width and height of image, then active portrait or landscape class of the image. If portrait do {height:175px; width:auto}. If landscape, reverse height and width.

提交回复
热议问题