为什么这些元素对齐?

编程入门 行业动态 更新时间:2024-10-10 04:20:40
本文介绍了为什么这些元素对齐?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我创建一个搜索栏和放大器;与jQuery这样的按钮形式:

I am creating a search bar & button form with jquery like this:

var search_list_item = $("<li />"); var search_form = $("<form />", { name: "search_form", class: "search_form" }); var search_input = $("<input />", { type: "text", name: "search_input", class: "search_bar" }); var search_button = $('<input' + ' type="submit"' + ' value="&#128269;"' + ' class="search_button"' + ' name="search_button"' +' />'); search_form.append(search_input); search_form.append(search_button); search_list_item.append(search_form);

在CSS设置与此

The CSS is set with this

.search_bar{ background-color:white; box-shadow: rgb(204, 204, 204) 0px 0px 0px 1px inset; border: 1px solid rgb(178, 210, 203); border-radius: 8px; height: 20px; width: 150px; font-size: 12px; } .search_button { cursor: pointer; border: 0px; background-color: #d4d4d4; font-family: 'EntypoRegular'; color: #5f615c; font-size: 30px; line-height: 1px; padding: 0px; height: 20px; width: 20px; left: 15.4%; }

在HTML找出来是这样的:

The HTML comes out looking like this:

更多推荐

为什么这些元素对齐?

本文发布于:2023-11-28 00:03:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1640151.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:元素

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!