小编Sam*_*ton的帖子

使用CSS和jQuery进行页面转换

我真的需要你的帮助.我正在创建一个像这样的页面转换:http: //goo.gl/74K2rQ

但是我正在按照这个动画进行我的OWN设计:http://goo.gl/NVjcZ2

到目前为止,我的实验是什么:https://jsfiddle.net/f7xpe0fo/1/

而且它还没有遵循我的设计.要查看我的实际JSFIDDLE,请在此处查看:https://jsfiddle.net/8y801eqh/11/

我的HTML包含的是我用ID的主页和下一页创建了两个div.第一页为红色,下一页为绿色.默认情况下,我隐藏下一页div.看看我的HTML:

<div id="main-page">
 <div>
     <h1>Page Transition</h1>
       <a href="#"> Click Here</a>
</div>

</div>


<div id="next-page">
 <div>
     <h1>This is the 2nd page</h1>
       <a href="#"> Click Here</a>
</div>

</div>
Run Code Online (Sandbox Code Playgroud)

现在为我的CSS我修改他们的设计以匹配整个页面:

#main-page {
  height: 50vh;
  width: 100%;
  position: fixed;
  left: 0;
  background-color: #e74c3c;
 padding: 40px 0 40px 0;
}

h1{
   font-family: Helvetica;
   color: #fff;
    font-weight: normal;
    text-align: center;

}

#next-page{
      height: 50vh;
  width: 100%;
  position: fixed;
  left: 0;
  background-color: …
Run Code Online (Sandbox Code Playgroud)

html css jquery

8
推荐指数
1
解决办法
767
查看次数

将for循环的值放在数组中

我试图创建一个包含1to 之间所有奇数的数组20,000.我使用var_dump()末尾显示数组值而不使用循环.

由于某种原因,它将无法解决.

到目前为止这是我的代码:

$array_variable = array();

for($i=1; $i<=20000; $i++){
    if($i%2 == 1){ // if the remainder after division `$i` by 2 is one{
        print_r($array_variable[$i]); // if odd, echo it out and then echo newline for better readability;
    }
}

var_dump($array_variable);
Run Code Online (Sandbox Code Playgroud)

html css php

5
推荐指数
2
解决办法
1080
查看次数

如何用CSS创建管理固定背景?

我正在尝试创建一个如下所示的背景效果:http://goo.gl/ZVIdvp仅使用PURE CSS.

我也想知道如何才能使它具有响应性.

到目前为止,这是我对HTML的看法:

    <header class="header">
        <h1>Fixed Background Effect</h1>
    </header>

    <section class="background-fixed img-1">
        <div class="main-content">
            <h2>Title here</h2>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Autem dolor beatae, laudantium eos fugiat, deserunt delectus quibusdam quae placeat, tempora ea? Nulla ducimus, magnam sunt repellendus modi, ad ipsam est.</p>
        </div>
    </section>

    <section class="background-fixed img-2">
        <div class="main-content light-background">
            <h2>Title here</h2>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Autem dolor beatae, laudantium eos fugiat, deserunt delectus quibusdam quae placeat, …
Run Code Online (Sandbox Code Playgroud)

html css jquery

4
推荐指数
1
解决办法
72
查看次数

标签 统计

css ×3

html ×3

jquery ×2

php ×1