对应的html代码

<!doctype html>
<html lang="zh-hans">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="stylesheet" href="lib/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="css/galary.css">
    <title>gallery</title>
</head>
<body>
    <div class="banner">
        <h1>HELLO,</h1>
        <h2>I'M MATHIEU RICHARD</h2>
    </div>
    <div class="img-gallery">
        <div class="row">
            <figure class="figure-item col-sm-3">
             <a href="#">
                <img src="http://lorempixel.com/800/400/nature/1/" alt="img1"/>
                <figcaption>
                    <h2>Legend</h2>
                    <p>Lorem ipsum dolor sit amet</p>
                </figcaption>
            </a>
            </figure>

            <figure class="figure-item col-sm-3">
             <a href="#">
                <img src="http://lorempixel.com/800/400/nature/4/" alt="img1"/>
                <figcaption>
                    <h2>Legend</h2>
                    <p>Lorem ipsum dolor sit amet</p>
                </figcaption>
            </a>
            </figure>

            <figure class="figure-item col-sm-3">
             <a href="#">
                <img src="http://lorempixel.com/800/400/nature/2/" alt="img1"/>
                <figcaption>
                    <h2>Legend</h2>
                    <p>Lorem ipsum dolor sit amet</p>
                </figcaption>
            </a>
            </figure>

            <figure class="figure-item col-sm-3">
             <a href="#">
                <img src="http://lorempixel.com/800/400/nature/3/" alt="img1"/>
                <figcaption>
                    <h2>Legend</h2>
                    <p>Lorem ipsum dolor sit amet</p>
                </figcaption>
            </a>
            </figure>
        </div>

        <div class="row">
            <figure class="figure-item col-sm-3">
             <a href="#">
                <img src="http://lorempixel.com/800/400/nature/4/" alt="img1"/>
                <figcaption>
                    <h2>Legend</h2>
                    <p>Lorem ipsum dolor sit amet</p>
                </figcaption>
            </a>
            </figure>

            <figure class="figure-item col-sm-3">
             <a href="#">
                <img src="http://lorempixel.com/800/400/nature/3/" alt="img1"/>
                <figcaption>
                    <h2>Legend</h2>
                    <p>Lorem ipsum dolor sit amet</p>
                </figcaption>
            </a>
            </figure>

            <figure class="figure-item col-sm-3">
             <a href="#">
                <img src="http://lorempixel.com/800/400/nature/1/" alt="img1"/>
                <figcaption>
                    <h2>Legend</h2>
                    <p>Lorem ipsum dolor sit amet</p>
                </figcaption>
            </a>
            </figure>

            <figure class="figure-item col-sm-3">
             <a href="#">
                <img src="http://lorempixel.com/800/400/nature/2/" alt="img1"/>
                <figcaption>
                    <h2>Legend</h2>
                    <p>Lorem ipsum dolor sit amet</p>
                </figcaption>
            </a>
            </figure>
        </div>
    </div>
    <div class="form-section">
        <h1>Contact</h1>
        <form role="form">
            <div class="form-group">
                <input type="text" class="form-control" placeholder="Name"/>
            </div>
            <div class="form-group">
                <input type="text" class="form-control" placeholder="Mail"/>
            </div>
            <div class="form-group">
                <textarea  " placeholder="Message"></textarea>
            </div>
            <div class="form-group">
                <button type="submit" class="btn btn-default">提交</button>
            </div>
        </form>
    </div>
    <script src="lib/jquery-2.1.4.min.js"></script>
    <script src="lib/bootstrap/js/bootstrap.min.js"></script>
</body>

对应的css样式代码

a{
    color:white;
    text-decoration:none;
}

.banner{
    margin-top:-40px;
    height:500px;
    width:%;
    text-align:center;
    background-size:cover;
    background-image:url(http://images.forwallpaper.com/files/thumbs/preview/20/205186__photo-close-up-snow-leaves-blur-bokeh-background-wallpaper_p.jpg);
}

.banner h1{
    font-size:.6em;
    font-weight:bold;
    color:white;
    font-family: "Zeyada";
    padding-top:150px;
}
.banner h2{
    font-size:.3em;
    color:white;
    text-align:center;
    font-family: "Zeyada";
    margin-top:20px;
}
.figure-item{
    height:250px;
    position:relative;
    overflow:hidden;
}

.figure-item img{
    height:250px;
    width:%;
    position:absolute;
    top:;
    left:;
}

.figure-item figcaption{
    height:250px;
    position:absolute;
    width:%;
    background:url(http://gridelicious.net/themes/treble/demo/assets/images/css/thumb_over.png) no-repeat center 150px black;
    top:;
    left:-250px;
    text-align:center;
    color:white;
    padding:5px;
    opacity:;
    transition:all .7s;
}
.figure-item:hover figcaption{
    opacity:0.8;
    top:;
    left:;
}

.form-section{

    background-image:url(http://images.forwallpaper.com/files/thumbs/preview/20/205186__photo-close-up-snow-leaves-blur-bokeh-background-wallpaper_p.jpg);
    background-size:cover;
    text-align:center;
    padding:30px;
}
.form-section h1{
    color:white;
    font-size:.5em;

}
.form-section form{
    max-width:600px;
    margin:30px auto;

}
.form-section form input{
    background-color:rgba(,,,0.2);

}
.form-section form textarea{
    background-color:rgba(,,,0.2);
}
.form-section form button{
    display:block;
    width:%;

}

前端实战——照片墙gallery的实现的更多相关文章

  1. vue前端实战注意事项

    1. vue前端实战注意事项 1.1. 预备 1.1.1. Eslint 这是个语法检查工具,我用webstorm作为开发的ide,这个语法检查还是太严格了,一个空格啥的都会报错,对新手来讲还是建议关 ...

  2. Web 前端实战:Gitee 贡献图

    前言 这次要做的 Web 前端实战是一个 Gitee 个人主页下的贡献图(在线 Demo),偶尔做一两个,熟悉熟悉 JS 以及 jQ.整体来说这个案例并不难,主要是控制第一个节点以及最后一个节点处于星 ...

  3. Web 前端实战:JQ 实现树形控件

    前言 这是一篇个人练习 Web 前端各种常见的控件.组件的实战系列文章.本篇文章将介绍个人通过 JQuery + 无序列表 + CSS 动画完成一个简易的树形控件. 最终实现的效果是: 这样结构比较复 ...

  4. 前端实战Demo:一张图片搞定一页布局

    对前端程序员来说,从设计师的手中拿过设计图和素材之后根据需要进行切图是必要的基本功,但是一般的程序员可能对切图并非那么熟悉,所以可能有很多时间都花在使用Photoshop上,那么这里就有一种方法可以减 ...

  5. 【h5+c3】web前端实战项目、快装webapp手机案例源码

    快装WebApp项目(Web移动端开发案例)webapp移动端项目源码.html5+css3实战案例分享.微信端H5实例开发 简介快装WebApp是一个面向移动端的快速装修app,此项目为手机端:使用 ...

  6. 算法问题实战策略 GALLERY

    地址 https://algospot.com/judge/problem/read/GALLERY 分析 如图 显然是需要在 0 1 2三个点进行监控即可.(0 2 3 也可) 根据题意,不存在回路 ...

  7. 前端实战——前端效果accordition的实现

    一.bootstrap实现 1)水平折叠组件 使用panel和collaspe组件 <!doctype html> <html lang="zh-hans"> ...

  8. \ HTML5开发项目实战:照片墙

    html <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <ti ...

  9. Web 前端实战(三):雷达图

    前言 在<Canvas 线性图形(五):多边形>实现了绘制多边形的函数.本篇文章将记录如何绘制雷达图.最终实现的效果是这样的: 绘制雷达图 雷达图里外层 如动图中所示,雷达图从里到外一共有 ...

随机推荐

  1. 解决main No MyBatis mapper was found in 的警告

    在集成Spring + mybaits时出现以下警告 org.mybatis.spring.mapper.MapperScannerConfigurer$Scanner.main No MyBatis ...

  2. 用ultraISO 制作一个MSdos启动软盘镜像

    见过软盘,但是没用过,在虚拟机里试试. 磁带,软盘,光盘,硬盘…… 储存介质一代代更新,看到的img.iso文件都是叫做镜像文件(image file ).image 即图片照片,所谓的image f ...

  3. Ant Tasks 使用总结

    xmlproperty http://ant.apache.org/manual/Tasks/xmlproperty.html Ant的xmlproperty的Task能直接读取一个xml文件以生成相 ...

  4. jQuery 两种方法实现IE10以下浏览器的placeholder效果

    /* ** jQuery版本:jQuery-1.8.3.min.js ** 测试的浏览器:IE8,IETester下的IE6-IE9** Author:博客园小dee */ placeholder是H ...

  5. 浏览器 user-agent 字符串的故事

    你是否好奇标识浏览器身份的User-Agent,为什么每个浏览器都有Mozilla字样? 故事还得从头说起,最初的主角叫NCSA Mosaic,简称Mosaic(马赛克),是1992年末位于伊利诺伊大 ...

  6. 匈牙利命名法,骆驼命名法(camel),帕斯卡(Pascal)命名法(转)

    一.匈牙利命名法      Windows 编程中用到的变量(还包括宏)的命名规则匈牙利命名法,这种命名技术是由一位能干的 Microsoft 程序员查尔斯·西蒙尼(Charles Simonyi) ...

  7. VSS 访问问题

    局域网同一网段的2台电脑,防火墙都是关闭的 A能ping通B 但A在运行输入B的IP地址 不能访问 求解答 1.确认输入的地址格式没有写错,例如B的IP地址为:192.168.1.20.那么在A电脑的 ...

  8. Linux环境PHP7.0安装

    原文地址:http://blog.csdn.net/21aspnet/article/details/47708763 PHP7和HHVM比较 PHP7的在真实场景的性能确实已经和HHVM相当, 在一 ...

  9. android 设计工具栏

    设计工具栏Action Bar(订制工具栏类型) 工具栏给用户提供了一种熟悉和可预测的方式来执行某种动作和操纵应用程序,但是这并不意味着它就需要和其他的应用程序看起来一样的.如果想设计工具栏以使得它能 ...

  10. JAVA Exchanger

    //Exchanger工具类的使用案例 //本文给出一个简单的例子,实现两个线程之间交换数据,用Exchanger来做非常简单. import java.util.concurrent.Exchang ...