float引起层飘出父层的解决方法
1.加clear空div
.clearfix:after {
content: “.”; display: block;
height: 0;
clear: both;
visibility: hidden;}
.clearfix {display: inline-block;}
/* Hides from IE-mac \*/
* html .clearfix {height: 1%;}
.clearfix {display: block;}/* End hide from IE-mac */
.clearfix {
display: block;
margin: 0px;
clear: both;
padding: 0px;
visibility: hidden;
background-color:#666666;
border:0px none #FFFFFF;
}
.clearfix:after { height: 1px;}
使用方法:
在所有浮动层之后加上这个层
<div class=”clearfix”></div>
2.把背景层加浮动,但是这个方法会影响其他的div,有时候好用。
3.加 overflow 这个也有问题,会影响div的外观。
相关推荐
-
float引起层飘出父层的解决方法
1.加clear空div .clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden;} .clearfix {display: inline-block;} /* Hides from IE-mac \*/ * html .clearfix {height: 1%;} .clearfix {display: block;}/* End hide from IE-m
-
layui: layer.open加载窗体时出现遮罩层的解决方法
如下所示: 把窗体方法独立出来放在layer.use([],function(){});外面,需要的时候从layer.use方法里面调用,就不会出现遮罩层 layer.use([],function(){ $("#添加按钮id").click(function(){ editData("",form,"添加") ; }) ; }); function editData(data,from,title){ var win = layer.open(
-
win7中C#的winForm编程使用savefiledialog不能弹出保存窗体的解决方法
本文实例分析了win7中C#的winForm编程使用savefiledialog不能弹出保存窗体的解决方法.分享给大家供大家参考.具体分析如下: 复制代码 代码如下: public void ResMsg() { while (isRecMsg) { //准备一个数组 准备接收 服务端发来的数据 byte[] msgRec = new byte[1024 * 1024 * 2]; //接收服务端发来的数据,此方法也会阻断当前线程,并返回接收的数据的长度 int recLe
-
iOS键盘弹出遮挡输入框的解决方法
本文为大家分享了iOS键盘弹出遮挡输入框的解决方法,供大家参考,具体内容如下 问题:输入框被键盘遮挡 期望效果:输入框位于键盘上方 解决思路: 监听键盘出现和消失的状态,当键盘出现时,当前视图上移,当输入完成收起键盘时,视图回到初始状态. 难点:视图向上平移的距离 原理都差不多,oc版参考代码: self.phoneInput = [UITextField new]; self.phoneInput.placeholder = @"请输入..."; [self.view addSubv
-
.net 刷新页面后弹出重试框的解决方法
关闭模式窗口后,需要刷新父页面,但是模式窗口关闭后,父页面总是会弹出"重试"消息框,如下图所示: 解决方法:在父页面的form标签中,添加属性 method="get" ,将post修改为get,这样父页面刷新的时候就不会再弹出"重试"框了
-
flash 挡住层的解决方法
出现问题: 1. 使用层制作的下拉菜单下正好有FLASH动画,菜单被动画遮挡. 2. 页面中的层浮动广告当经过FLASH动画时,浮动层从动画画穿过,实际显示被遮挡. 解决方法: 按如下任一方法设置设置FLASH对象的属性 <param name="wmode" value="transparent"> FLASH将透明 <param name="wmode" value="Opaque"> FLASH仍
-
springboot springmvc抛出全局异常的解决方法
springboot中抛出异常,springboot自带的是springmvc框架,这个就不多说了. springmvc统一异常解决方法这里要说明的是.只是结合了springboot的使用而已.直接上代码,有效有用的才是ok. 1.定义异常捕获 package com.example.rest.error; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.Exce
-
JavaScript页面刷新与弹出窗口问题的解决方法
一.无提示刷新网页 大家有没有发现,有些网页,刷新的时候,会弹出一个提示窗口,点"确定"才会刷新.而有的页面不会提示,不弹出提示窗口,直接就刷新了. 如果页面没有form,则不会弹出提示窗口. 如果页面有form表单, a)< form method="post" ...> 会弹出提示窗口 b)< form method="get" ...> 不会弹出 二.javascript刷新页面的方法 window.location
-
关于flash遮盖div浮动层的解决方法
网上的解决方案: From:http://codingforums.com/showthread.php?t=95109 (a) place Flash embed script in <div> container (I use SWFObject.js)[将flash嵌入脚本放到一个div容器中] (b) add wmode=transparent to Flash embed script[增加wmode=transparent 到flash嵌入脚本] (c) set <div i
-
MySql总弹出mySqlInstallerConsole窗口的解决方法
MySql总是定时弹出一个MySQLInstallerConsole.exe的窗口,如何解决呐? 这貌似是一条安装命令,Installing MYSQL 5.6.21 using MySQLInstallerConsole.exe 使用它可以设置一些下载安装包,当然使用的是默认安装不需人工干预.关掉它也没有什么影响,win10状态下,从开始---->所有应用----->管理工具----->任务计划程序---->左侧任务计划程序库文件夹,展开文件夹---->mYsql子文件夹i
随机推荐
- js中鼠标滚轮事件详解(firefox多浏览器)
- 天枫常用的ASP函数封装如下
- CentOS安装和设置MariaDB的教程
- JavaScript prototype 使用介绍
- 简述AngularJS的控制器的使用
- Centos7使用yum安装Mysql5.7.19的详细步骤
- 不错的winodws XP 优化处理文件
- ASP.NET MVC Layout如何嵌套
- php中instanceof 与 is_a()区别分析
- 实例讲解Android中的AutoCompleteTextView自动补全组件
- JavaScript图片轮播代码分享
- AjaxToolKit之Rating控件的使用方法
- vue-dialog的弹出层组件
- Mybatis多参数及实体对象传递实例讲解
- 对于最近出现的Death.exe病毒及其变种的手工查杀办法不用专杀工具
- c# 应用事务的简单实例
- 分享J2EE的13种核心技术
- ThinkPHP基本的增删查改操作实例教程
- OPENCV批量读取图片实现方法
- Linux下的网络监听技术之一
