Created
May 2, 2019 12:23
-
-
Save PanagiotisPtr/0994d72475878bcc71666379fb8f3eff to your computer and use it in GitHub Desktop.
Simple Material Design card
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!-- Similar to: https://storage.googleapis.com/spec-host-backup/mio-design%2Fassets%2F1eZNTdj8h1J0BFkbl23LyzEwjjvMzY_uV%2Fcards-elements-2b.png --> | |
<html> | |
<style> | |
body { | |
font-family: 'Roboto', sans-serif; | |
} | |
.row-container { | |
display: flex; | |
flex-direction: row; | |
} | |
.col-container { | |
display: flex; | |
flex-direction: column; | |
} | |
.card { | |
background:#ffffff; | |
border-radius: 2%; | |
box-shadow: 0px 0px 4px #919191; | |
} | |
.card-title { | |
font-weight: 700; | |
font-size: 1.5em; | |
} | |
.card-title .secondary { | |
font-size: 0.7em; | |
font-weight: 100; | |
color: gray; | |
} | |
.user-photo { | |
background: gray; | |
border-radius: 100%; | |
width: 3em; | |
height: 3em; | |
} | |
.thumbnail { | |
width: 23em; | |
height: 13em; | |
} | |
.description { | |
margin: 1.2em; | |
width: 20.6em; | |
} | |
.action-btn { | |
font-weight: 700; | |
font-size: 1.1em; | |
padding: 0.5em; | |
margin: 0.7em; | |
cursor: pointer; | |
color: #9000ff; | |
} | |
</style> | |
<head> | |
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> | |
</head> | |
<body> | |
<div class="row-container" style="justify-content: center"> | |
<div class="card col-container" style="margin-top: 12.5%;"> | |
<div class="row-container" style="align-items: center;"> | |
<div class="user-photo" style="margin: 1.2em;"></div> | |
<div class="card-title"> | |
Title goes here | |
<div class="secondary"> | |
Secondary text | |
</div> | |
</div> | |
</div> | |
<img class="thumbnail" src="https://www.logistec.com/wp-content/uploads/2017/12/placeholder.png" alt="placeholder"> | |
<p class="description"> | |
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | |
</p> | |
<div class="row-container"> | |
<div class="action-btn">Action 1</div> | |
<div class="action-btn">Action 2</div> | |
</div> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the result:
https://prnt.sc/njhlhh