html - 如何使用 HTML 和 CSS 创建邮箱
解决方案
这就是你想要的?
我的源代码中只有这样的代码
* {
box-sizing: border-box;
}
body {
padding: 0 1em;
font-family: sans-serif;
}
/* * Post widget * */
input[type="file"] {
display: none;
}
ul {
list-style-type: none;
}
.btn {
padding: .5em 1em;
background-color: transparent;
color: #6b7270;
border: none;
cursor: pointer;
}
.widget-post {
width: 600px;
min-height: 100px;
height: auto;
border: 1px solid #eaeaea;
border-radius: 6px;
box-shadow: 0 1px 2px 1px rgba(130, 130, 130, 0.1);
background-color: #fff;
margin: auto;
overflow: hidden;
}
.widget-post__header {
padding: .2em .5em;
background-color: #eaeaea;
color: #3f5563;
}
.widget-post__title {
font-size: 18px;
}
.widget-post__content {
width: 100%;
height: 50%;
}
.widget-post__textarea {
width: 100%;
height: 100%;
padding: .5em;
border: none;
resize: none;
}
.widget-post__textarea:focus {
outline: none;
}
.widget-post__options {
padding: .5em;
}
.widget-post___input {
display: inline-block;
width: 24%;
padding: .2em .5em;
border: 1px solid #eaeaea;
border-radius: 1.5em;
}
.post-actions__label {
cursor: pointer;
}
.widget-post__actions {
width: 100%;
padding: .5em;
}
.post--actions {
position: relative;
padding: .5em;
background-color: #f5f5f5;
color: #a2a6a7;
}
.post-actions__attachments {
display: inline-block;
width: 60%;
}
.attachments--btn {
background-color: #eaeaea;
color: #007582;
border-radius: 1.5em;
}
.post-actions__widget {
display: inline-block;
width: 38%;
text-align: right;
}
.post-actions__publish {
width: 120px;
background-color: #008391;
color: #fff;
border-radius: 1.5em;
}
.scroller::-webkit-scrollbar {
display: none;
}
.is--hidden {
display: none;
}
.sr-only {
width: 1px;
height: 1px;
clip: rect(1px, 1px, 1px, 1px);
-webkit-clip-path: inset(50%);
clip-path: inset(50%);
overflow: hidden;
white-space: nowrap;
position: absolute;
top: 0;
}
/* * Placeholder contrast * */
::-webkit-input-placeholder {
color: #666;
}
::-moz-placeholder {
color: #666;
}
:-ms-input-placeholder {
color: #666;
}
:-moz-placeholder {
color: #666;
}
<div class="widget-post" aria-labelledby="post-header-title">
<div class="widget-post__header">
<h2 class="widget-post__title" id="post-header-title">
<i class="fa fa-pencil" aria-hidden="true"></i>
Write Me
</h2>
</div>
<form id="widget-form" class="widget-post__form" name="form" aria-label="post widget">
<div class="widget-post__content">
<label for="post-content" class="sr-only">Share</label>
<textarea name="post" id="post-content" class="widget-post__textarea scroller" placeholder="What's wrong with r00tme?"></textarea>
</div>
<div class="widget-post__options is--hidden" id="stock-options">
</div>
<div class="widget-post__actions post--actions">
<div class="post-actions__attachments">
<button type="button" class="btn post-actions__stock attachments--btn" aria-controls="stock-options" aria-haspopup="true">
<i class="fa fa-usd" aria-hidden="true"></i>
stock
</button>
<button type="button" class="btn post-actions__upload attachments--btn">
<label for="upload-image" class="post-actions__label">
<i class="fa fa-upload" aria-hidden="true"></i>
upload image
</label>
</button>
<input type="file" id="upload-image" accept="image/*" multiple>
</div>
<div class="post-actions__widget">
<button class="btn post-actions__publish">publish</button>
</div>
</div>
</form>
</div>
推荐阅读
- python - 用 Selenium 提取第一个跨度子项
- php - 无法在 Substr 中提取带有变量的字符串
- apache-spark - 使用 apache-curator 在纱线上的火花流中存储 kafka 偏移量。异常:用户类抛出异常:java.lang.NoSuchMethodError
- django - Django中的数据库配置
- python - 写入新行 - Xlsxwriter
- batch-file - 在 CMD/Batch 中,我可以存储 WMIC 返回的值吗?
- laravel - 将 ckeditor 与 laravel 6 集成
- grouping - 在 Cytoscape.js 中将节点分组在一起
- java - 为什么 Kafka 的 seekToBeginning 和 seekToEnd 不能与 assign 一起使用?
- amazon-s3 - 使用 express.js 将大型视频文件上传到 s3