è¦ä»¶æ¦è¦: ããã¯ã¹ã®ãµã¤ãºã¯åºå® 横é·ã®ç»åãæ¥ããããã¯ã¹ã®æ¨ªå¹ ã«åããã 縦é·ã®ç»åãæ¥ããããã¯ã¹ã®ç¸¦å¹ ã«åããã ç»åãµã¤ãºãããã¯ã¹ãµã¤ãºããå°ããå ´åã¯ãã®ã¾ã¾ 縦横ä¸å¤®æã çµè«ããããã¨ãã縦横ä¸å¤®æãã以å¤ã®è¦ä»¶ã¯ä¸è¨ã®CSSã§å®ç¾ã§ãã¾ãã img { width:auto; height:auto; max-width:100%; max-height:100%; } ããã¯ã¹å ã§ç»åã縦横ã«ä¸å¤®æãããããå ´åãå¤ãã¨æãã¾ãããã¢ãç¨æãã¾ããã®ã§ããåèä¸ããã See the Pen 4 way to keep image ratio inside a box by wang (@yaquawa) on CodePen. å ¨é¨ã§5éãã®æ¹æ³ã§ããããã¯ã¹ã®ç«¯ããã©ãã°ãã¦ãªãµã¤ãºãã¦ã¿ã¦ãã ãããããã¯ã¹ã®ãµã¤ãºã«å¿ãã¦åã¾ãæ¹ãå¤ãã£ã¦ãããã¨ã確èªã§ãã
{{#tags}}- {{label}}
{{/tags}}