• CSS: Float a div on another div, Ex: Text caption on picture


    <style type="text/css">
        .figure {
            width: 316px;
            height: 205px;
            display: block;
            border-color: azure;
            position: relative;
        }
        .figure img {
            z-index: 0;
        }
        .figure .caption {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            height: 22;
            width:inherit;
            display:inline-block;
            color: #fff;
            background-color: rgba(0,0,0,.5);
            z-index: 100;
        }
    </style>
    <div class="figure">
        <img src="http://img-aws.ehowcdn.com/320x208/ehow-tech-blog-us/files/2014/07/google-maps-measure.gif" alt="[Article Image] - How to Supercharge Google Maps" title="How to Supercharge Google Maps" class="image">
        <div class="caption"> How to Supercharge Google Maps </div>
    </div>
    [Article Image] - How to Supercharge Google Maps
    How to Supercharge Google Maps
  • 相关阅读:
    手动去除迅雷7广告
    MIPS学习笔记
    龙芯中断系统
    《ecos增值包》之FAT文件系统篇
    MIPS架构学习笔记
    【3D数学】之向量
    【温故Delphi】之窗口ShowModal
    【Manage It】之项目规划
    【3D数学】之坐标系
    【Manage It】之启动项目
  • 原文地址:https://www.cnblogs.com/feika/p/4544609.html
Copyright © 2020-2023  润新知