iFrame Height Auto (CSS)

后端 未结 8 1951
无人共我
无人共我 2020-12-08 09:54

I am having problems with my iframe. I really want the frame to auto adjust heights according to the content within the iframe. I really want to do this via the CSS without

8条回答
  •  感情败类
    2020-12-08 10:29

     

    Update Information

    #support-box { width: 50%; float: left; display: block; height: 20rem; /* is support box height you can change as per your requirement*/ background-color:#000; } #wrapper { width: 90%; display: block; position: relative; top: 50%; transform: translateY(-50%); background:#ffffd; margin:auto; height:100px; /* here the height values are automatic you can leave this if you can*/ } #wrapper iframe { width: 100%; display: block; padding:10px; margin:auto; }

    https://jsfiddle.net/umd2ahce/1/

提交回复
热议问题