Quick CSS
Posted in
2618
1:45 am, March 31, 2022
create a border with top triangle in css
Here is a quick css and html code that gives you an element with a triangle on the top left border.
Looks a bit like a callout box.
Preview
create a border with top triangle in css Demo
View Demo Full Screen View Demo New Tab
create a border with top triangle in css Code
HTML
<div class="container">Border with top triangle</div>
CSS
.container {
position: relative;
background: #ffffff;
padding: 15px;
border: 1px solid #dddddd;
margin-top: 20px;
color:#444;
}
.container:before,
.container:after {
content: '';
position: absolute;
bottom: 100%;
left: 19px;
border: 11px solid transparent;
border-bottom-color: #dddddd;
}
.container:after {
left: 20px;
border: 10px solid transparent;
border-bottom-color: #ffffff;
}
External Link for create a border with top triangle in css
Add Comment
Other Items in Quick CSS
Related Search Terms
Other Categories in Code
404 pages animation animations background effects boxes buttons css css & javascript css animation css animations css backgrounds css cursors css framework css frameworks css modal css positions css reset css shadows css slider css text effects css text formatting css tips css tools css z-index content slider cookie alerts design html css sections html canvas html sections icons image zoom interactive images lightbox link effects loading animation modals mouse effects navigation notifications parallax profiles quick css seo sections text ui web developer checklists animations backgrounds bootstrap buttons css css animated css animations css framework css grid footers forms html image effects images javascript scroll effects sections show your work svg text animation timeline
css animations
HTML Canvas
javascript