(1) 设置父级元素的行高 line-height,和高度 height
原则:line-height=height
(2) 再设置内联元素的
vertical-align: middle
通常在开发中,都会有公共的页面部分(不只是导航栏,头部,尾页等)
主页面中,需要拼接的地方,加入以下代码:
<iframe src="common/log_reg_top.html" height="60" scrolling="no" frameborder="no"></iframe>
参数解读:
src
:要贴进来的页面地址
height
:原页面的高
scrolling
:取消滚轮
frameborder
:取消框架的边缘线
iframe{ /*变成块级元素*/ display: block; /*宽度100*/ width: 100%; }
如果嫌麻烦也可以写在2.1的代码里,这里作为抽取公共代码角度把他抽出来,放在一个公共的css样式里
border-radius
1.div{border-radius:x[px]}
2.div{border-radius:x[px] x[px] x[px] x[px]}
$.ajax({ url :"",//跳转到的url地址 type:"",//请求方式 post/get datatype :"",//返回来的数据类型 //需要传递的数据,以json格式,如:"username":username,"password":password //$("#edit").serialize():表单序列化.注意:必须存在name属性,其他用法google //作用:获取id为edit的所有input标签的值并自己转入到对象中 data:{}, async : true,//是否异步 success:function (obj) {//成功的回调函数,obj为传回来的数据 if (obj!==null){ console.log(obj); // object { realname="金圣聪", password="xxx", id=1, 更多...} //js中设置session,对应的取session是sessionstorage.getitem(key) sessionstorage.setitem("realname",obj.realname); sessionstorage.setitem("id",obj.id); //跳转到主页 location.href="main.html"; }else{ alert("登录失败!用户名或密码错误"); } }, error:function () {//失败执行的方法 alert("登录失败!用户名或密码错误"); } })
/** * 判断字符串为空 * @param obj 需要判断的字符串 * @returns {boolean} true 为空,false不为空 */ function isempty(obj){ return typeof obj === "undefined" || obj === null || obj === ""; }
//(很重要)截取地址栏上的参数 function getlocationparam(name) { var reg = new regexp("(^|&)" + name + "=([^&]*)(&|$)"); var r = window.location.search.substr(1).match(reg); // alert(window.location.search); if (r != null) return unescape(r[2]); return null; }
(键盘
1左边的)
做字符串拼接var rightbottomstrhead = ` <strong style="float: left">销售信息查询:</strong> 排序方式: <select name="condition"> <option value="0">销售日期</option> <option value="1">单笔总价</option> </select> <div style="float: right" class="rightbottomstrhead"> </div> `;
如对本文有疑问, 点击进行留言回复!!
清除新版Google Chrome浏览器中表单控件(input,button...)默认的黑色边框
荐 20200714——git/mac配置/项目运行步骤/一些报错
antd 菜单组件 使用时报错:Cannot read property ‘isRootMenu‘ of undefined
CSS|div的style=“background-image: url(img/a.bmp)图片显示不出来
硬件仪表盘账号建立指导(一) --WHQL认证测试结果提交账号(一)
cookie的规范Cookie的不可跨域名性或Cookie与域名的关系
网友评论