温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

怎么使用CSS3美化HTML5表单

发布时间:2022-02-24 14:54:20 来源:亿速云 阅读:192 作者:小新 栏目:web开发

小编给大家分享一下怎么使用CSS3美化HTML5表单,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!

目前表单格式如下:

#redemption {

width: 100%;

font-family: 'ColaborateThinRegular';

font-weight: 400;

}

#redemption hgroup {

argin-bottom: 20px;

}

#redemption div {

width: 100%;

margin-bottom: 15px;

float: left;

}

#redemption span#range {

float: left;

font-size: 3em;

width: 100%;

color: red;

clear: both; text-align: center;

}

#howYouRateThis,#yearOfCrime {

text-align: right;

}

#redemption legend {

font-style: italic;

color: #434242;

font-size: 0.8em;

margin-bottom: 20px;

float: left; width: 100%;

}

#redemption fieldset {

border: 1px dotted #cccccc;

padding: 2%;

margin-bottom: 20px;

}

#redemption label {

width: 40%;

float: left;

}

#redemption input {

height: 20px;

font-size: 1em;

width: 40%;

float: right;

}

#redemption textarea {

height: 60px;

font-size: 1em;

width: 40%;

float: right;

}

#redemption input#submit {

text-decoration: none;

height: 34px;

font: 1.25em /* 36px ÷ 16 */ 'BebasNeueRegular'; background-color: #b01c20;

border-radius: 8px;

color: white; float: right;

margin-bottom: 10px;

background: linear-gradient(top, rgb(241,92,96) 0%, rgb(17 100%);

margin-top: 10px;

box-shadow: 5px 5px 5px hsla(0, 0%, 26.6667%, 0.8);

text-shadow: 0px 1px black;

border: 1px solid #bfbfbf;

.polyfill-important .input-range,.polyfill-important .step-c float: right;

}

.polyfill-important .step-controls {

margin-right: -20px!important;

}

唯一需要注意的地方是最后两个样式只在相应的补丁脚本运行时发挥作用。 首先,我想让每个 fieldset都有一个好看的渐变背景,相互之间稍微空开一点。下面 是针对 fieldset修改后的 CSS 代码:

#redemption fieldset {

border: 1px dotted #cccccc;

padding: 2%;

margin-bottom: 20px;

background: #ffffff; background: linear-gradient(top, #ffffff 77%,#f2f2f2 100%);

border-radius: 4px;

box-shadow: 2px 2px 5px hsla(0, 0%, 16.6667%, 0.3);

}

以上是“怎么使用CSS3美化HTML5表单”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注亿速云行业资讯频道!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI