小工具知识网

当前位置: 首页 > 行业知识 > 前端使用css去除input框的默认样式

行业知识

前端使用css去除input框的默认样式

2026-11-08 02:08:09 来源:互联网转载

关键点:

/* 关键点,让输入框无边框 */    outline:none;      border:none;

1.效果图

2.html

                                            

3.css

.container input{    width: 100%;    height: 7vh;    /* 关键点,让输入框无边框 */    outline:none;      border:none;    border-bottom: 1px solid #ccc;}/* 修改placeholder默认样式 */.container input::-webkit-input-placeholder {    /* padding-left: 5px; */    font-size: 16px;    color: gray; }

上一篇:服务器怎么挂梯子上去?

下一篇:ps荧光字怎么做?