css div垂直居中
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
.main{
position:absolute;
top:%;
left:%;
width:200px;
height:100px;
margin-top:-50px;
margin-left:-100px; border:1px solid red;
line-height:30px;
font-size:16px;
text-align:center;
}
</style>
</head> <body>
<div class="main">王锋老师博客:http://blog.sina.com/wangfengteacher</div>
</body>
</html>
css div垂直居中的更多相关文章
- CSS——div垂直居中及div内文字垂直居中
最近做demo时,经常需要div垂直居中或者让div内文字相对div垂直居中.水平居中比较简单,就不多说了,这里主要记录一下垂直居中的一些方法. 一.div垂直居中的一些方法: 1.当height.w ...
- css div 垂直居中
参考:http://css-tricks.com/centering-in-the-unknown/ <style> .valign { font-size: 0px;/* clear s ...
- div垂直居中 css div盒子上下垂直居中
div垂直居中 css div盒子上下垂直居中,让DIV盒子在任何浏览器中任何分辨率的显示屏浏览器中处于水平居中和上下垂直居中. div垂直居中常用于单个盒子,如一个页面里只有一个登录布局,使用div ...
- css的div垂直居中的方法,百分比div垂直居中
前言 我们都知道,固定高宽的div在网页中垂直居中很简单,相信大家也很容易的写出来,但是不是固定高宽的div如何垂直居中呢?我们在网页布局,特别是手机等web端网页经常是不固定高宽的div,那么这些d ...
- css中固定宽高div与不固定宽高div垂直居中的处理办法
固定高宽div垂直居中 如上图,固定高宽的很简单,写法如下: position: absolute; left: 50%; top: 50%; width:200px; height:100px; m ...
- css 文本和div垂直居中方法汇总
https://blog.csdn.net/u014607184/article/details/51820508 https://blog.csdn.net/liuying1802028915/ar ...
- 纯css使div垂直居中,div垂直,div居中的方法
首先编写一个简单的html代码,设置一个父div类名为boxFather,再设置一个子div类名为box1.html代码如下: <div class="boxFather"& ...
- html css div img垂直居中
<head> <meta charset="UTF-8"> <meta name="Generator" content=&quo ...
- 让div垂直居中的5种方法
方法一: 这个方法把 div 的显示方式设置为表格,然后我们可以使用表格的 vertical-align property 属性. HTML & CSS: <div class=&quo ...
随机推荐
- [转]Java Web基础——Action+Service +Dao三层的功能划分
原文地址:http://blog.csdn.net/inter_peng/article/details/41021727 参考来源:http://www.xuebuyuan.com/2153333. ...
- mysql查询所有记录,并去掉重复的记录
select * from tablename group by name;如果是select * from tablename group by name,age;那么查询的是满足name和age都 ...
- Jquery-pagination.js分页处理
首先提供pagination.js的插件源码 /** * This jQuery plugin displays pagination links inside the selected elemen ...
- 算法与数据结构之选择排序(C语言)
#include<stdio.h> #include<stdlib.h> void SelectSort(int *a,int n);//预声明要调用的函数 int main( ...
- svn服务器无法访问时检查几个文件:
出现该问题基本都是三个配置文件的问题,下面把这个文件列出来. svnserve.conf:[general]anon-access = readauth-access = writepassword- ...
- Win7下完全卸载Oracle 11g的步骤
1 右击“计算机”-->管理-->服务和应用程序-->服务,停掉所有Oracle相关的服务(以Oracle打头的,比如OracleDBConsoleorcl). 2 开始--> ...
- MapReduce实现WordCount
package algorithm; import java.io.IOException; import java.util.StringTokenizer; import org.apache.h ...
- eclipse中项目右上方有一个s,eclipse中项目左下方友谊个红色的叉,eclipse中项目左下方友谊个红色的感叹号
S,这个猜测使用了Spring tools 然后可以方便的建立xml配置文件,然后平时不用在意 红的叉,这个可能是tomcat没有的不合适,可以在properties里面的找到runtime然后改成合 ...
- Linux下的文本编辑工具
vi/vim nano(据说Ubuntu下推荐用这个,有点反人类,不太习惯) emacs
- struts2 CVE-2012-0838 S2-007 Remote Code Execution && Hotfix
catalog . Description . Effected Scope . Exploit Analysis . Principle Of Vulnerability . Patch Fix 1 ...