Replicate the ubuntu terminal and applied on the textarea
Created
July 3, 2024 02:43
-
-
Save kckustomac/9afb34812235bebca78a8b953df5b141 to your computer and use it in GitHub Desktop.
Command Line Textarea
This file contains hidden or 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
<div class="wrapper"> | |
<div class="cmd"> | |
<div class="title-bar">ubuntu@ubuntu: ~</div> | |
<div class="tool-bar"> | |
<ul> | |
<li><a href="#">File</a></li> | |
<li><a href="#">Edit</a></li><li><a href="#">View</a></li> | |
</ul> | |
</div> | |
<textarea class="textarea">Type something here...</textarea> | |
</div> | |
</div> |
This file contains hidden or 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
body{ | |
font-family: arial; | |
} | |
.wrapper{ | |
width: 800px; | |
height: 100vh; | |
margin: 0 auto; | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
} | |
.cmd{ | |
position: relative; | |
display: block; | |
height: 300px; | |
width: 100%; | |
border: 1px solid #000000; | |
border-radius: 4px; | |
overflow: hidden; | |
box-shadow: 0px 8px 18px #4b1d3f; | |
} | |
/* | |
* 1. Set position | |
* 2. Set dimension | |
* 3. Style | |
*/ | |
.title-bar{ | |
/* 1 */ | |
position: absolute; | |
top: 0; | |
left: 0; | |
right: 0; | |
/* 2 */ | |
width: 100%; | |
height: 40px; | |
/* 3 */ | |
display: block; | |
color: #FFFFFF; | |
line-height: 40px; | |
font-weight: 600; | |
background-color: #242424; | |
text-align: center; | |
} | |
.tool-bar{ | |
position: absolute; | |
top: 40px; | |
left: 0; | |
right: 0; | |
display: block; | |
width: 100%; | |
height: 30px; | |
line-height: 30px; | |
background-color: #242424; | |
} | |
.tool-bar ul{ | |
list-style-type: none; | |
margin: 0px; | |
padding: 0px; | |
} | |
.tool-bar ul li{ | |
display: inline-block; | |
margin: 0; | |
padding: 0; | |
} | |
.tool-bar ul li a{ | |
padding: 0px 6px; | |
text-decoration: none; | |
color: #FFFFFF; | |
} | |
.tool-bar ul li a:hover{ | |
text-decoration: underline; | |
} | |
.textarea{ | |
position: relative; | |
top: 70px; | |
padding: 12px; | |
resize: none; | |
width: 100%; | |
height: calc(100% - 70px); | |
background-color: #4b1d3f; | |
border: none; | |
color: #FFFFFF; | |
margin: 0px; | |
font-size: 1.1rem; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment