diff options
author | Yuanfei He <lhe868@gmail.com> | 2020-03-27 18:04:49 +0300 |
---|---|---|
committer | Yuanfei He <lhe868@gmail.com> | 2020-07-10 18:13:16 +0300 |
commit | 31cf328a878a8aeb57eef7142a9961b2566b8829 (patch) | |
tree | 7d2ead91b90583faba94f2ca7971e772f2e62cfd | |
parent | 381295acf54717d5912da3ab6957b72d8cf7087e (diff) |
update home post list style
-rw-r--r-- | layouts/index.html | 4 | ||||
-rw-r--r-- | static/css/style.css | 13 |
2 files changed, 14 insertions, 3 deletions
diff --git a/layouts/index.html b/layouts/index.html index dfd3ae0..690d342 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -33,8 +33,8 @@ <div id="home_post" class="row"> {{ with .Param "header_images" }} <div class="col-md-3"> - <a href='{{$url}}'> - <img style="width:100%;height:260px;overflow: hidden" src="{{.}}" alt="."> + <a href='{{$url}}'> + <img class="image-container" src="{{.}}"> </a> </div> diff --git a/static/css/style.css b/static/css/style.css index 59eb338..6db4f10 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -369,9 +369,20 @@ figure.floatleft { float: left !important; } +.image-container { + max-height:350px; + vertical-align : middle; + overflow: hidden; + width: 100%; + height:auto; + left:50%; + position: relative; + -webkit-transform: translateX(-50%); + -ms-transform: translateX(-50%); + -moz-transform: translateX(-50%); +} #home_post .col-md-3{ padding-left:0px; - text-align:center; padding-right:0px; } #home_post { |