Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.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
Html Stairstep Div格式_Html_Css_Xhtml - Fatal编程技术网

Html Stairstep Div格式

Html Stairstep Div格式,html,css,xhtml,Html,Css,Xhtml,我有一个客户,他想在他们的主页上有一个特定的设计来匹配他们杂志封面上看到的内容。封面的基本台阶设计从未改变,但偶尔图像也会改变。我一直无法想出一种方法来涵盖这种格式,而不使用1大图像 这是一把小提琴: 注意:此小提琴的外观与客户希望看到的外观是正确的。我的问题是,它使用了一个必须偶尔更改的大图像。如果将这三幅图像分开,就会容易得多 有人知道我能做到这一点的最好方法吗?图像可以通过HTML或CSS来放置,无论哪种方式都不重要,不过如果能在HTML中看到它们,对搜索引擎优化都有好处 如果小提琴没有在

我有一个客户,他想在他们的主页上有一个特定的设计来匹配他们杂志封面上看到的内容。封面的基本台阶设计从未改变,但偶尔图像也会改变。我一直无法想出一种方法来涵盖这种格式,而不使用1大图像

这是一把小提琴:

注意:此小提琴的外观与客户希望看到的外观是正确的。我的问题是,它使用了一个必须偶尔更改的大图像。如果将这三幅图像分开,就会容易得多

有人知道我能做到这一点的最好方法吗?图像可以通过HTML或CSS来放置,无论哪种方式都不重要,不过如果能在HTML中看到它们,对搜索引擎优化都有好处

如果小提琴没有在这里显示图像,它就是

HTML:

<h2>Innovative Engineering Solutions in Material Handling</h2>

<div class="home-container">
<div class="home-content"><p>Experience the impact that Lauyans &amp; Company can make on your business success.  Through innovative engineering solutions in material handling, Lauyans will take responsibility for the planning, execution and acceptance of your project.</p>

<!--h2>Lauyans... why choose anyone else?</h2-->


<h2 style="margin: 80px 0 0 30px;">Lauyans...<br />  why choose<br />  anyone else?</h2>


</div><!-- END HOME CONTENT -->

</div><!-- END HOME CONTAINER -->

<div class="home-container2">
<div class="home-planning">
<h3>Planning</h3>
</div>
<div class="home-execution">
<h3>Execution</h3>
</div>
<div class="home-acceptance">
<h3>Acceptance</h3>
</div>
</div>

考虑到您追求的“独特”布局,我会选择绝对定位路线:

我修改了所有东西(包括我必须从其他地方获取的图像):

HTML


这种方式需要将图像切碎一点,但如果这样做很酷,它也可以工作:

HTML:


我在小提琴上没有看到任何图像…它不起作用?它给我看。这里有一个直接的链接:据我所知,这应该在IE中工作,没有任何问题。非常感谢。这正是我需要的。嗯。。。请参阅下面的链接,了解实际中的此解决方案。。。是什么导致它在页面上方飘移?我最初认为这是一个解决方案,但如果可以通过大小模板替换图像,而不必将图像裁剪成两半,这将是理想的。
.home-container { width: 690px; height: 459px; background: url('/wp-content/uploads/2013/01/home-image.png') 50% 100% no-repeat; }
.home-container2 { width: 690px; }
.home-content { width: 430px; height: 429px; padding: 15px; }
.home-content p { padding: 0; margin: 0; }
.home-content h2 { padding-top: 10px; margin: 0; }
.home-container2 h3 { padding-top: 0px; margin: 0; text-align: center; }
.home-planning { width: 230px; float: left; }
.home-execution { width: 230px; float: left; }
.home-acceptance { width: 230px; float: left; }
<div class="home_con">

    <h2 class="pge_title">Innovative Kitten Solutions</h2>

    <div class="home_step">
        <h2 class="step-title">Lauyans...<br />  why choose<br />  anyone else?</h2>

        <p>
            Experience the impact that Kittens can make on your business success through
            purring.
        </p>   

        <img class="img1" src="http://www.vivapets.com/img/album/52/19052_white_persian_kittens_for_adoption_thb.jpg" />

        <img class="img2" src="http://www.saudivets.com/images/Vpic20.jpg" />   

        <img class="img3" src="http://fc04.deviantart.net/fs70/f/2011/167/2/8/kitten_tracks_banner_100x300_by_xxjessie_kittehxx-d3j2h51.png" />

    </div>

    <div class="img_text">
        <div class="img_text_ele">Planning</div>
        <div class="img_text_ele">Execution</div>
        <div class="img_text_ele">Acceptance</div>
    </div> 

</div>
.home_con h2.pge_title { font-weight:bold; font-size:1.125em; }

.home_step { width:300px; height:300px; position:relative; }
.home_step h2.step-title { position:absolute; top:110px; left:10px; }
.home_step p { width:200px; position:absolute; top:10px; left:10px; }
.home_step img { position:absolute; bottom:0px; }
.home_step .img1 { left;0px; }
.home_step .img2 { left:100px; }
.home_step .img3 { left:200px; }

.home_con .img_text { width:300px; overflow:hidden; }
.home_con .img_text_ele { width:100px; float:left; text-align:center; }
<div class="container">
    <div class="row">
        <div class="span2">1</div>
        <div class="span1" style="background:#ccc;">2</div>
    </div>
    <div class="row">
        <div class="span1">3</div>
        <div class="span1"  style="background:#666;">4</div>
        <div class="span1"  style="background:#ccc;"></div>
    </div>
    <div class="row">
        <div class="span1" style="background:#999;">5</div>
        <div class="span1" style="background:#666;">6</div>
        <div class="span1" style="background:#ccc;">7</div>
    </div>
</div>
.container {
    width:600px;
}

.row {
    overflow: hidden;
}

.span1 {
    float:left;
    width:200px;
    height:200px;
}

.span2 {
    width:400px;
    height:200px;
    float:left;
}