- 新建一个Html文件
- 在<head>里写入一个内部样式 <style>
- 第一方法在body写入<button>标签,该标签在HTML5中定义的是一个按钮的
- 在<button>标签内写入文字或设置样式,不设置可能会到导致<button>在页面中显示不出来
- 样式主要以尺寸、字体、背景 button{ width: 60px; height: 20px; font-size: 12px; text-decoration: underline; border-radius: 4px; color:skyblue}
- 第二个方法是用<input>标签
- 写入<input>标签,插入type属性,type的值为submit,<input type=” submit”>
- <input>标签可以不写入文字,它自带内容,为提交
- <input>内容,用属性value值,写入“按钮”<input type=”submit” value=”按钮”>
- <input>的样式设置input[type=” submit”]{width:60px; height:20px; font-size:12px; font-weight: bold; text-decoration:underline; border-radius:4px; color:black;}
版权声明:本文为LILI_JU88原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。