news widget

Bootstrap snippet. news widget, this snippet was created to help web designers,
front-end developers and back-end developer save time. Use it in your project and build your app faster,
You can also download the HTML, CSS, and JS code.
tags: cards

HTML code

Copy, paste, change, customize and run the following HTML code to get a result like the one shown in the preview selection

<div class="container bootstrap snippet">
    <div class="col-sm-5">
    	<div class="widget single-news">
    		<div class="image">
    			<img src="https://lorempixel.com/300/200/sports/1/" class="img-responsive">
    			<span class="gradient"></span>
    		</div>
    		<div class="details">
    			<div class="category"><a href="">News</a></div>
    			<h3><a href="">More rain at salt flats delays racer's pursuit of land speed record</a></h3>
    			<time>Today, 18 August</time>
    		</div>
    	</div>
    </div>
    
    <div class="col-sm-5">
    	<div class="widget single-news">
    		<div class="image">
    			<img src="https://lorempixel.com/300/200/nature/1/" class="img-responsive">
    			<span class="gradient"></span>
    		</div>
    		<div class="details">
    			<div class="category"><a href="">News</a></div>
    			<h3><a href="">More rain at salt flats delays racer's pursuit of land speed record</a></h3>
    			<time>Today, 18 August</time>
    		</div>
    	</div>
    </div>
    
    <div class="col-sm-5">
    	<div class="widget single-news">
    		<div class="image">
    			<img src="https://lorempixel.com/300/200/nature/2/" class="img-responsive">
    			<span class="gradient"></span>
    		</div>
    		<div class="details">
    			<div class="category"><a href="">News</a></div>
    			<h3><a href="">More rain at salt flats delays racer's pursuit of land speed record</a></h3>
    			<time>Today, 18 August</time>
    		</div>
    	</div>
    </div>
</div>

CSS code

Copy, paste, change, customize and run the following CSS code to get a result Like the one shown in the preview selection

body{ 
    margin-top:20px;
    background-color: #eee;
}

a:hover{
 text-decoration:none;    
}

.widget.single-news {
    margin-bottom: 20px;
    position: relative;
}

.widget.single-news .image img {
    display: block;
    width: 100%;
}

.widget.single-news .image .gradient {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0d…IxIiBoZWlnaHQ9IjEiIGZpbGw9InVybCgjbGVzc2hhdC1nZW5lcmF0ZWQpIiAvPjwvc3ZnPg==);
    background-image: -webkit-linear-gradient(bottom, #000000 0%, rgba(0, 0, 0, 0.05) 100%);
    background-image: -moz-linear-gradient(bottom, #000000 0%, rgba(0, 0, 0, 0.05) 100%);
    background-image: -o-linear-gradient(bottom, #000000 0%, rgba(0, 0, 0, 0.05) 100%);
    background-image: linear-gradient(to top, #000000 0%, rgba(0, 0, 0, 0.05) 100%);
}

.widget.single-news .details {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
}

.widget.single-news .details .category {
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.widget.single-news .details .category a {
    color: #fff;
    zoom: 1;
    -webkit-opacity: 0.5;
    -moz-opacity: 0.5;
    opacity: 0.5;
    -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50);
    filter: alpha(opacity=50);
}

.widget.single-news .details h3 {
    margin: 0;
    padding: 0;
    margin-bottom: 10px;
    font-size: 19px;
}

.widget.single-news .details h3 a {
    color: #fff;
    zoom: 1;
    -webkit-opacity: 0.8;
    -moz-opacity: 0.8;
    opacity: 0.8;
    -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
    filter: alpha(opacity=80);
}

.widget.single-news .details:hover time {
    position: relative;
    display: block;
    color: #fff;
    font-size: 13px;
    margin-bottom: -20px;
    -webkit-transition: all 350ms cubic-bezier(0.175, 0.885, 0.320, 1.275);
    -moz-transition: all 350ms cubic-bezier(0.175, 0.885, 0.320, 1.275);
    -o-transition: all 350ms cubic-bezier(0.175, 0.885, 0.320, 1.275);
    transition: all 350ms cubic-bezier(0.175, 0.885, 0.320, 1.275);
    zoom: 1;
    -webkit-opacity: 0;
    -moz-opacity: 0;
    opacity: 0;
    -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
    filter: alpha(opacity=0);
}









                                    

Similar snippets

Bootstrap snippet bs4 ecommerce products

bs4 ecommerce products

View

Bootstrap snippet bs4 Contacts cards

bs4 Contacts cards

View

Bootstrap snippet bs4 contact cards

bs4 contact cards

View

About this snippet

Creator: Dey Dey

Bootstrap version: 3.3.4

Created: Aug 17th 2015, 23:06

Views: 6.2K

Rated 5/5 based on 4 reviews