Timeline Style

来源:https://www.cnblogs.com/geovindu/archive/2019/01/18/10287986.html
-Advertisement-
Play Games

from: https://freefrontend.com/css-timelines/ https://bootstrapthemes.co/items/resources/timeline/ https://github.com/twbs/bootstrap/releases css: htm ...


from: https://freefrontend.com/css-timelines/ 

https://bootstrapthemes.co/items/resources/timeline/

https://github.com/twbs/bootstrap/releases

 

css:

.demo{ background: #25303b;
padding: 100px 0;}
.heading-title
{
	margin-bottom: 100px;
	color: #fff;
}
.main-timeline{
    width: 80%;
    margin: 20px auto;
    position: relative;
}

.main-timeline:before{
    content: "";
    display: block;
    width: 2px;
    height: 100%;
    background: rgba(255,255,255,0.2);
    margin: 0 0 0 -1px;
    position: absolute;
    top: 0;
    left: 50%;
}

.main-timeline .timeline{
    width: 100%;
    margin-bottom: 20px;
    position: relative;
}

.main-timeline .timeline:after{
    content: "";
    display: block;
    clear: both;
}

.main-timeline .timeline-content{
    width: 40%;
    float: left;
    margin: 5px 0 0 0;
    border-radius: 6px;
}

.main-timeline .date{
    display: block;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #25303b;
    padding: 5px 0;
    margin: 0 0 0 -36px;
    position: absolute;
    top: 0;
    left: 50%;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 0 0 0 7px #25303b;
}

.main-timeline .date span{
    display: block;
    text-align: center;
}

.main-timeline .day,
.main-timeline .year{
    font-size: 10px;
}

.main-timeline .month{
    font-size: 18px;
}

.main-timeline .title{
    padding: 15px;
    margin: 0;
    font-size: 20px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -1px;
    border-radius: 6px 6px 0 0;
    position: relative;
}

.main-timeline .title:after{
    content: "";
    width: 10px;
    height: 10px;
    position: absolute;
    top: 20px;
    right: -5px;
    transform: rotate(-45deg);
}

.main-timeline .description{
    padding: 15px;
    margin: 0;
    font-size: 14px;
    color: #656565;
    background: #fff;
    border-radius: 0 0 6px 6px;
}

.main-timeline .timeline:nth-child(2n+2) .timeline-content{
    float: right;
}

.main-timeline .timeline:nth-child(2n+2) .title:after{
    left: -5px;
}
/*有多少條要設置其量*/
.main-timeline .timeline:nth-child(1) .title,
.main-timeline .timeline:nth-child(1) .title:after{
    background: #9f84c4;
}

.main-timeline .timeline:nth-child(2) .title,
.main-timeline .timeline:nth-child(2) .title:after{
    background: #02a2dd;
}

.main-timeline .timeline:nth-child(3) .title,
.main-timeline .timeline:nth-child(3) .title:after{
    background: #58b25e;
}

.main-timeline .timeline:nth-child(4) .title,
.main-timeline .timeline:nth-child(4) .title:after{
    background: #efb715;
}

.main-timeline .timeline:nth-child(5) .title,
.main-timeline .timeline:nth-child(5) .title:after{
    background: #ffe218;
}

.main-timeline .timeline:nth-child(6) .title,
.main-timeline .timeline:nth-child(6) .title:after{
    background: #eab788;
}



@media only screen and (max-width: 990px){
    .main-timeline{ width: 100%; }
}

@media only screen and (max-width: 767px){
    .main-timeline:before,
    .main-timeline .date{
        left: 6%;
    }
    .main-timeline .timeline-content{
        width: 85%;
        float: right;
    }
    .main-timeline .title:after{
        left: -5px;
    }
}

@media only screen and (max-width: 480px){
    .main-timeline:before,
    .main-timeline .date{
        left: 12%;
    }
    .main-timeline .timeline-content{
        width: 75%;
    }
    .main-timeline .date{
        width: 60px;
        height: 60px;
        margin-left: -30px;
    }
    .main-timeline .month{
        font-size: 14px;
    }
}@charset "utf-8";
/* CSS Document */

  

html5:

<!DOCTYPE html>
<html lang="en">
  <head>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<link rel="stylesheet" href="style/style.css">
<title>Timeline Style</title>
</head>

<body>
 <div class="demo">
        <div class="container">
            <div class="row text-center">
                <h1 class="heading-title">Timeline Style</h1>
            </div>

            <div class="row">
                <div class="col-md-12">
                    <div class="main-timeline">
                    
                                           
                        <div class="timeline">
                            <div class="timeline-content">
                                <span class="date">
                                    <span class="day">10<sup>th</sup></span>
                                    <span class="month">Apr</span>
                                    <span class="year">2017</span>
                                </span>
                                <h2 class="title">Web Design</h2>
                                <p class="description">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dapibus, quam non pellentesque consequat, massa justo elementum nunc, ac efficitur tortor nunc sit amet dolor.</p>
                            </div>
                        </div>

                        <div class="timeline">
                            <div class="timeline-content">
                                <span class="date">
                                    <span class="day">12<sup>th</sup></span>
                                    <span class="month">Apr</span>
                                    <span class="year">2017</span>
                                </span>
                                <h2 class="title">Web Development</h2>
                                <p class="description">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dapibus, quam non pellentesque consequat, massa justo elementum nunc, ac efficitur tortor nunc sit amet dolor.</p>
                            </div>
                        </div>

                        <div class="timeline">
                            <div class="timeline-content">
                                <span class="date">
                                    <span class="day">14<sup>th</sup></span>
                                    <span class="month">Apr</span>
                                    <span class="year">2017</span>
                                </span>
                                <h2 class="title">Brand Building</h2>
                                <p class="description">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dapibus, quam non pellentesque consequat, massa justo elementum nunc, ac efficitur tortor nunc sit amet dolor.</p>
                            </div>
                        </div>

                        <div class="timeline">
                            <div class="timeline-content">
                                <span class="date">
                                    <span class="day">16<sup>th</sup></span>
                                    <span class="month">Apr</span>
                                    <span class="year">2017</span>
                                </span>
                                <h2 class="title">Responsive Design</h2>
                                <p class="description">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla dapibus, quam non pellentesque consequat, massa justo elementum nunc, ac efficitur tortor nunc sit amet dolor.</p>
                            </div>
                        </div>
                        
                         <div class="timeline">
                            <div class="timeline-content">
                                <span class="date">
                                    <span class="day">28<sup>th</sup></span>
                                    <span class="month">Aug</span>
                                    <span class="year">2017</span>
                                </span>
                                <h2 class="title">中國人民解放軍</h2>
                                <p class="description">生中朝右發的凱撒獎地板革最悲歌羅東進榴蓮味覺得撒開了房間.</p>
                            </div>
                        </div>
                        
                        <div class="timeline">
                            <div class="timeline-content">
                                <span class="date">
                                    <span class="day">26<sup>th</sup></span>
                                    <span class="month">Jun</span>
                                    <span class="year">2018</span>
                                </span>
                                <h2 class="title">深圳市羅湖區布心路3008號</h2>
                                <p class="description">塗聚文,昵稱:Geovin Du.繁體:塗聚文,生命在於運動。營養膳食養生。</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


</body>
</html>

 

效果:

 


您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 寫這篇文章之前,關於ubuntu14.04(Trusty)預設安裝的NodeJS版本是0.10.25百思不解(什麼鬼,哪一年的NodeJS) 寫這篇文章之時,NodeJS的LTS版本號都已經10.15.0,當然Ubuntu在2018年也都發行ubuntu18.04(我還沒打算用) 系統我可以用4年前... ...
  • 一個簡單的代碼段,用於跟蹤網站上的網頁瀏覽量,而無需添加外部庫。 也適用於使用react和vue.js等單頁應用程式。 Before Google Tag Manager + Analytics = 73kB After Snippet = 1.5kB ...
  • 101-110章總結 101. dom查詢的剩餘方法 我是第一個box1我是box1中的div 我是box1中的div 我是box1中的div 我是box1中的div 102. dom增刪改 你喜歡哪個城市? 北... ...
  • js獲取頁面完整地址: window.location.href; var s =" https://ejym.baidu.com"; var h = s.split(".")[0]; var a = h.split("//")[1]; alert(a); a的結果是:ejym ...
  • arguments 是一個類似數組的對象, 對應於傳遞給函數的參數。 語法 arguments 描述 arguments對象是所有函數中可用的局部變數。你可以使用arguments對象在函數中引用函數的參數。此對象包含傳遞給函數的每個參數的條目,第一個條目的索引從0開始。例如,如果一個函數傳遞了三個 ...
  • 1、在springboto項目中使用thymeleaf標簽,必須先添加依賴,如下。 2、在application.properties中配置一些常用的thymeleaf,如下。 可參考博客:https://blog.csdn.net/ice_lemon_g/article/details/73609 ...
  • 錯誤信息:Exception processing template “/view/df”: Error resolving template “/view/df”, template might not exist or might not be accessible by any of the ...
  • 初學node.js,跟著node入門,操作了一遍。在最後一步,上傳圖片並顯示時遇到報錯 根據報錯信息,查找到相應的代碼, 首先想到的是代碼中是相對路徑,導致不能查找到文件所在的位置,於是將路徑補全 還是同樣的報錯 仔細觀察後發現在路徑名中可能存在的左右反斜杠的問題。即在windows中路徑名間隔符為 ...
一周排行
    -Advertisement-
    Play Games
  • 移動開發(一):使用.NET MAUI開發第一個安卓APP 對於工作多年的C#程式員來說,近來想嘗試開發一款安卓APP,考慮了很久最終選擇使用.NET MAUI這個微軟官方的框架來嘗試體驗開發安卓APP,畢竟是使用Visual Studio開發工具,使用起來也比較的順手,結合微軟官方的教程進行了安卓 ...
  • 前言 QuestPDF 是一個開源 .NET 庫,用於生成 PDF 文檔。使用了C# Fluent API方式可簡化開發、減少錯誤並提高工作效率。利用它可以輕鬆生成 PDF 報告、發票、導出文件等。 項目介紹 QuestPDF 是一個革命性的開源 .NET 庫,它徹底改變了我們生成 PDF 文檔的方 ...
  • 項目地址 項目後端地址: https://github.com/ZyPLJ/ZYTteeHole 項目前端頁面地址: ZyPLJ/TreeHoleVue (github.com) https://github.com/ZyPLJ/TreeHoleVue 目前項目測試訪問地址: http://tree ...
  • 話不多說,直接開乾 一.下載 1.官方鏈接下載: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads 2.在下載目錄中找到下麵這個小的安裝包 SQL2022-SSEI-Dev.exe,運行開始下載SQL server; 二. ...
  • 前言 隨著物聯網(IoT)技術的迅猛發展,MQTT(消息隊列遙測傳輸)協議憑藉其輕量級和高效性,已成為眾多物聯網應用的首選通信標準。 MQTTnet 作為一個高性能的 .NET 開源庫,為 .NET 平臺上的 MQTT 客戶端與伺服器開發提供了強大的支持。 本文將全面介紹 MQTTnet 的核心功能 ...
  • Serilog支持多種接收器用於日誌存儲,增強器用於添加屬性,LogContext管理動態屬性,支持多種輸出格式包括純文本、JSON及ExpressionTemplate。還提供了自定義格式化選項,適用於不同需求。 ...
  • 目錄簡介獲取 HTML 文檔解析 HTML 文檔測試參考文章 簡介 動態內容網站使用 JavaScript 腳本動態檢索和渲染數據,爬取信息時需要模擬瀏覽器行為,否則獲取到的源碼基本是空的。 本文使用的爬取步驟如下: 使用 Selenium 獲取渲染後的 HTML 文檔 使用 HtmlAgility ...
  • 1.前言 什麼是熱更新 游戲或者軟體更新時,無需重新下載客戶端進行安裝,而是在應用程式啟動的情況下,在內部進行資源或者代碼更新 Unity目前常用熱更新解決方案 HybridCLR,Xlua,ILRuntime等 Unity目前常用資源管理解決方案 AssetBundles,Addressable, ...
  • 本文章主要是在C# ASP.NET Core Web API框架實現向手機發送驗證碼簡訊功能。這裡我選擇是一個互億無線簡訊驗證碼平臺,其實像阿裡雲,騰訊雲上面也可以。 首先我們先去 互億無線 https://www.ihuyi.com/api/sms.html 去註冊一個賬號 註冊完成賬號後,它會送 ...
  • 通過以下方式可以高效,並保證數據同步的可靠性 1.API設計 使用RESTful設計,確保API端點明確,並使用適當的HTTP方法(如POST用於創建,PUT用於更新)。 設計清晰的請求和響應模型,以確保客戶端能夠理解預期格式。 2.數據驗證 在伺服器端進行嚴格的數據驗證,確保接收到的數據符合預期格 ...