python :HTML+CSS (Position)
position_fixed固定在某一个页面上
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
.pg_head{
height: 60px;
background-color: black;
color: white;
position: fixed;
/*position头部固定*/
top :0;
left:0;
right:0; }
.pg_body{
background-color:#dddddd;
height: 5000px;
margin-top: 20px;
}
</style>
</head>
<body>
<!--position fixed-->
<div class="pg_head"> 头部</div>
<div class="pg_body">内容</div>
</body>
</html>
position_fixed 固定在某一个页面上
position中 relative和 absolute的结合使用
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Title</title> </head>
<body>
<div style="position: relative;width: 500px;height: 200px;border: 1px solid red;margin: 0 auto;">
<div style="position: absolute;left:0;bottom:0;width: 50px;height: 50px;background-color: black;"></div>
</div>
<div style="position: relative;width: 500px;height: 200px;border: 1px solid red;margin: 0 auto;"> <div style="position: absolute;right:0;bottom:0;width: 50px;height: 50px;background-color: black;"></div>
</div>
<div style="position: relative;width: 500px;height: 200px;border: 1px solid red;margin: 0 auto;"> <div style="position: absolute;right:0;top:0;width: 50px;height: 50px;background-color: black;"></div>
</div>
</body>
</html>
position中 relative和 absolute的结合使用
IE浏览器显示图片是有蓝色边框的
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
img {
border: 0;
}
</style>
</head> <body>
<div> <!--默认img图片有蓝色的边框,如果border: 0;就可以去掉-->
<a href="http://www.baidu.com">
<img src="7.png" style="width: 820px; " alt="mei"/>
<!--或者-->
<img src="7.png" style="width: 820px;border: 0; " alt="mei"/>
</a>
</div>
</body>
</html>
IE浏览器显示图片是有蓝色边框的如何去掉
overflow图片显示不完全,现实滚动条
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<!--<div style="width:100px;height: 100px; overflow: hidden">-->
<!-- 按外面的大小隐藏图片大小overflow: hidden-->
<div style="width:100px;height: 100px; overflow: auto">
<!--图片大小带滚动条overflow: auto-->
<div>
<a><img src="7.png"/></a>
</div>
</div>
</body>
</html>
overflow图片显示不完全,现实滚动条
python :HTML+CSS (Position)的更多相关文章
- Python:程序练习题(二)
Python:程序练习题(二) 2.1温度转换程序. 代码如下: t=input("请输入带符号的温度值(如:32C):") if t[-1] in ["C", ...
- Python:基础知识(一)
输入 input():接收命令行下输入 1)在py2下:如果你输的是一串文字,要用引号''或者""引起来,如果是数字则不用. 2)在py3下:相当于py2的raw_input(), ...
- Python:如何排序(sort)
一.前言 对Python的列表(list)有两个用于排序的方法: 一个是内建方法list.sort(),可以直接改变列表的内容: >>> list1 = [9,8,7,6,5] &g ...
- Python:pyglet学习(2)图形的旋转&batch
这次讲讲图形的旋转和批量渲染(rotate.batch) 1:图形旋转 先看看上次的代码中的一段: glRotatef(rot_y, 0, 1, 0) glRotatef(rot_z,0,0,1) g ...
- Python:pyglet学习(1):想弄点3D,还发现了pyglet
某一天,我突然喜欢上了3D,在一些scratch教程中见过一些3D引擎,找了一个简单的,结果z轴太大了,于是网上一搜,就发现了pyglet 还是先讲如何启动一个窗口 先看看官网: Creating a ...
- Python:基础知识(二)
常用模块 urllib2 :用于发送网络请求,获取数据 (Pyhton2中的urllib2工具包,在Python3中分拆成了urllib.request和urllib.error两个包.) json: ...
- python: 基本知识(一)
从今天开始继续python的学习,将应用到到黑客学习中,一边学习黑客知识一边学习python. 1.类:(封装) class T: def __init__(self,...): //类对象创建后调 ...
- Python:itertools模块(转)
原文:http://www.cnblogs.com/cython/articles/2169009.html itertools模块包含很多创建迭代器的函数,可以用各种方式对数据进行循环操作,此模块中 ...
- Python:常用正则表达式(一)
文章转载于:http://www.cnblogs.com/Akeke/(博主:Akeke) https://www.cnblogs.com/Akeke/p/6649589.html (基于JavaSc ...
随机推荐
- 对JS原型的一些理解
一.首先给出一道经典的原型题目: var F = function(){}; Object.prototype.a = function(){}; Function.prototype.b = fun ...
- thinkphp条件查询和模糊查询的一些方法
#文章管理 public function adminArticle(){ $adminArticle=M("article"); $arr_seach=$this->sea ...
- HDU1019
Least Common Multiple Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Ot ...
- c# 基础部分 (基本数据类型-- 表达式)
一 基础部分 1.常用的基本数据类型 int longing(长整) shortint(短整) string(文本型) char(字符型) bool (布尔型) false true 2.常量于变量 ...
- NYOJ背包问题
#include <stdio.h> struct group{ int value; int weight; }; void Sort(group bag[],int num) { in ...
- 一些常用的NLTK频率分布类中定义的函数
fdist=FreqDist(samples)创建包含给定样本的频率分布fist.inc(sample)增加样本fdist['monstrous']计数给定样本出现的次数fdist.freq('mon ...
- VB鼠标指针
vbDefault 0 (缺省值)形状由对象决定. VbArrow 1 箭头. VbCrosshair 2 十字线(crosshair 指针). VbIbeam 3 I 型 VbIconPointer ...
- ExtJS笔记 Tree
The Tree Panel Component is one of the most versatile Components in Ext JS and is an excellent tool ...
- NEC学习 ---- 模块 - 带点文字链接列表
带点文字链接列表, 实现的效果是, 调整字体大小, 点的位置不会跟着变动. HTML如下: <div class="container"> <div class= ...
- ArcGIS Server,4000端口被占用
server使用的端口:http://resources.arcgis.com/zh-cn/help/main/10.2/index.html#//015400000537000000 cmd 输入命 ...