(HTML和CSS)不要让我更改iframe

时间:2016-07-22 03:59:06

标签: html css iframe

我已经尝试了所有我能想到的东西,但无论我尝试多少,它仍然不会让我改变高度/高度,它会让我改变宽度......

HTML(主页):

<iframe src="sidebar.php" width="20%" hight="800px"></iframe>

CSS(主页):

iframe {
    background-color: #222222;
    border: none;
    color: white;
    height: 100%;
}

有!

2 个答案:

答案 0 :(得分:0)

试一下

HTML

<iframe src="sidebar.php" ></iframe>

<强>的CSS

iframe {
    background-color: #222222;
    border: none;
    color: white;
    height: 100%;
    width:100%;
}

答案 1 :(得分:0)

高度的语法错误,应为高度

<iframe src="http://www.w3schools.com" width="400" height="400">

http://codepen.io/nagasai/pen/grZkOd