Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iphone上的图像高度怪异_Iphone_Html_Css - Fatal编程技术网

iphone上的图像高度怪异

iphone上的图像高度怪异,iphone,html,css,Iphone,Html,Css,这很奇怪。。如果你在iphone上加载我的页面,图像的高度会变得非常高。但它在计算机或Nexus7上运行良好(即图片获得100%的父图片)。有人能帮我找出原因吗? 以下是css(所有影响图像的内容都在/--body---/)下。: { box-sizing: border-box; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; font-family: 'fonten'; font-weight: 7

这很奇怪。。如果你在iphone上加载我的页面,图像的高度会变得非常高。但它在计算机或Nexus7上运行良好(即图片获得100%的父图片)。有人能帮我找出原因吗? 以下是css(所有影响图像的内容都在/--body---/)下。

{
    box-sizing: border-box; -webkit-box-sizing:border-box; -moz-box-sizing:border-box;
    font-family: 'fonten';
    font-weight: 700;

}

html, body 
{
    margin: 0;
    padding: 0;
}

body 
{
    background-image: url('css/bgnoise.png');
}


/*---------------------------    OTHER     -----------------------------------*/

.clearfix:before,
.clearfix:after 
{
    content:"";
    display:table;
}
.clearfix:after 
{
    clear:both;
}
.clearfix {
    zoom:1;
}

a {
    cursor: pointer;
    text-decoration: none;
    color: black;
}

section a:hover {
    opacity: 50%;
}

/*---------------------------    HEADER     -----------------------------------*/

header {
    background: #fff;
    margin-bottom: 50px;
}

h1 {
    text-align:center;
    margin: 0;
    padding: 50px;
    color:black;
}

.nav {
    text-align:center;
    text-transform: uppercase;
}

.nav li, ul {
    list-style: none;
    display: inline-block;
    margin: 0;
    padding: 0;
    margin-bottom: 25px;
    letter-spacing: 4px;
    color: black;
}

.nav li {
    margin-right: 10px;
}

.nav li:last-child {
    display: block;
    margin-right: 0;
}

.current_page_item a {
    color:#fe6330;
}


/*---------------------------    BODY     -----------------------------------*/


h3 {
    font-size: 1.75em;
    text-align: center;
}

h4 {
    text-align: center;
    font-size: 1.2em;
    margin-bottom: 0;
}


.seperator {
    height: 2px;
    background:black;
    width: 40%;
    margin:0px auto;
}

.quote {
    text-align: center;
    padding: 0px 20%;
    line-height: 200%;
    font-size: 0.85em;
}

.projects {
    margin-top: 20px;
    max-width: 960px;
    margin: 0 auto;
}

.proj {
    margin: 20px auto 0 auto;
    width: 60%;

}

.proj img {
    width: 100%;
    height: 100%; //this should make the pics height 100% of its parent
}

/*---------------------------    what i do     -----------------------------------*/

.whatido {
    background: white;
    padding:50px;
}

.dos {
    display: table;
    margin: 0 auto;
} .dos p {
    text-align: center;
}


/*---------------------------    FOOTER     -----------------------------------*/

footer{
    background: #232323;
    color: white;
    padding: 50px 0;
}

.footercont {
    display: table;
    margin: 0 auto;
} .footercont p {
    text-align: center;
} .footercont>p>a {
    color: white;
    font-size: 1.5em;
}

/*---------------------------    FONT     -----------------------------------*/

@font-face
{
font-family: 'fonten';
src: url('css/raleway/raleway_thin.ttf'),
    url('css/raleway/raleway_thin.otf'),
     url('css/raleway/raleway_thin.eot');
}

你在每一页上都声明了高度

<img width="940" height="940" src="http://hmpf.nu/wp-content/uploads/2013/02/test.jpg" class="attachment-full wp-post-image" alt="test">


这就是为什么如果不将“高度”设置为“自动”,它们会达到940高。

您已经在HTML和CSS中说明了宽度和高度

<img width="940" height="940" />

如果我去掉高度:100;图片的高度为960像素(它们的原始大小)hmmmmm,将高度设置为“自动”似乎可以解决这个问题。我不知道为什么,有人能告诉我吗?你那里有很多代码。。我建议您首先隔离您的问题,或者使用较小的代码块重新生成它。。这样每个人的生活都会更轻松
.proj img {width:100%;}