position

平时积累

二次信任 提交于 2020-02-21 08:30:58
div充满整个body <head> <title>div充满整个body</title> <style type="text/css"> body { background:blue; margin:0px; padding:0px;} .main { backgroundr:green; height:100% ; width:100%; position:absolute;} </style> </head> <body> <divclass="mian"> </div> </body> </html> 注:这个纠结的                                2012-4-2 ie7高度自动适应问题 给外层DIV加overflow:hidden; 文本打断 text-overflow:ellipsis; 当对象内文本溢出时显示省略标记(...) (For IE) overflow:hidden; 不显示超过对象尺寸的内容 (For IE,Mozilla) white-space: nowrap; 强制在同一行内显示所有文本,直到文本结束或者遭遇 br 对象 背景透明 内容不透明 background:rgba(255, 255, 255, 0.8) none repeat scroll 0 0 !important;/*实现FF背景透明,文字不透明*/

django之CreateView

我的梦境 提交于 2020-02-21 07:19:07
模型 from .BaseModel import BaseModel from django.db import models from django.urls import reverse class AdvPosition(BaseModel): name = models.CharField(max_length=255, help_text = "广告位名称") def get_absolute_url(self): return reverse('backend:adv-position-index') class Meta(BaseModel.Meta): db_table = 'adv_position' 模型中需要设定跳转地址,在保存成功后会根据这个地址跳转。 url path('adv-position/create', AdvPositionCreateView.as_view(), name = 'adv-position-create'), 由于model使用了app_name 所以需要再urls.py中添加 app_name = 'backend' create.html <form class="form-horizontal" action="{{ request.get_full_path }}" method="post"> {% csrf

CSS的position属性

故事扮演 提交于 2020-02-21 06:55:25
背景:学习前端知识,自己做页面 目的:学习前端知识 组网图:不涉及 工具:vscode1.41.0 简介:CSS的position属性; CSS的position属性用于指定元素在网页中定位的方式,它有四种属性: static:静态定位,不开启定位; fixed:固定定位,开启定位; relative:相对定位,开启定位; absolute:绝对定位,开启定位; 四种偏移量:top、right、bottom、left 实例演示一:relative相对定位和left的使用 < ! DOCTYPE html > < html lang = "en" > < head > < meta charset = "UTF-8" > < title > love < /title > < style > body { margin: 0px ; padding: 100px ; } h1 { margin: 0px ; width: 100px ; height: 50px ; background-color: blueviolet ; position: relative ; left: 200px ; } < /style > < /head > < body > < h1 > 一沙一世界 < /h1 > < /body > < /html > 实例演示一:absolute绝对定位,

element-ui Cascader 级联选择器 点击label选中

混江龙づ霸主 提交于 2020-02-20 11:35:13
通过修改label的样式解决: 注意:el-cascader-panel 是直接挂载在body上的,所以需要全局设置 .el-cascader-panel .el-radio{ width: 100%; height: 100%; z-index: 10; position: absolute; top: 10px; right: -10px; } .el-cascader-panel .el-radio__input{   visibility: hidden; //隐藏单选框,不隐藏就不用设置 } .el-cascader-panel .el-cascader-node__postfix{   top: 10px; } 来源: https://www.cnblogs.com/calamus/p/11813009.html

Android Studio 学习笔记(四):Adapter和RecyclerView说明

醉酒当歌 提交于 2020-02-18 21:36:40
在现版本中,滚动控件有多种,而相比于ListView,GridView,RecyclerView的用途更广,因此将前两者作为Adapter适配器的引入,再对RecyclerView进行简单讲解。 MVC & Adapter 为了方便理解,这里介绍一下Android应用设计的基础,也就是MVC架构,如图。 控制器(Controller)- 可看作一个中间桥梁,响应来自View的用户交互,通过对View设定的事件逻辑修改Model,再回传实现View的数据刷新。 视图(View) - 用户看到的图形界面,由界面设计人员负责。 模型(Model) - 保存数据状态,其中由程序员编写程序应有的功能(实现算法等等)、数据库专家进行数据管理和数据库设计(可以实现具体的功能)。 MVC架构:Model(数据)以Controller(控制器)设定的方式呈现在View(用户界面)中。 简而言之:Adapter在其中充当Controller(控制器)的角色,在其中设定每一个元素长什么样子,怎么排列各个元素的逻辑,再把包含代码逻辑的复杂数据按设定好的样式给View。其中自带的BaseAdapter用得最多。 常见用法是新建一个类继承自BaseAdapter,重写其中的方法并构造新的方法,结合ListView、GridView控件使用。 ListView和GridView的用法相似,只是功能不同

复大官网总结

戏子无情 提交于 2020-02-18 08:27:23
一、使用到的技术 html5 css3 javascript jquery bootstrap 第三方jquery插件 @media实现响应式布局 二、根据设计稿设计内容的宽度   PC端设计稿宽度是1920px的,这是在设计的时候根据电脑的浏览器分辨率来定的。         页面主体宽度(内容宽度)设置为1200px,1200px是一个比较适合PC端显示器浏览的安全内容宽度,保证在宽度大于1200px分辨率的设备下浏览页面不会出现横向滚动条,页面有banner地方的宽度就设置为100%,设置百分比的好处是可以根据屏幕分辨率的大小自动缩放。   移动端设计稿宽度为750px,750px是iphone6的物理像素,也叫屏幕分辨率。移动端设计稿是按照设备的物理像素所给。 物理像素:     顾名思义,就是设备屏幕上的实际像素,也就是说这个手机被出厂造出来的时候,这个屏幕上有多少个像素点,它的物理像素就是多少; 设备独立像素:     也叫做逻辑像素(对于前端来说,和css像素是一样的),这个不同的设备是不一样的,在viewport为ideal-viewport模式时, 如iphone6此时的viewport为375px,代表着我们在css中写375px就可以达到全屏的效果; 三、布局编写 3.1、页面整体结构 1 <!DOCTYPE html> 2 <html> 3 <head> 4

How to center an image in the middle of a div? [duplicate]

孤人 提交于 2020-02-18 05:40:49
问题 This question already has answers here : How to make an image center (vertically & horizontally) inside a bigger div [duplicate] (36 answers) Closed 2 years ago . I need to center an image in a middle of a div. <div class="main"> <img...> </div> In the example below the image is centered, but not in the middle. https://jsfiddle.net/web_garaux/tng7db0k/ 回答1: Simple and easy method to do this, .test { background-color: orange; width: 700px; height: 700px; display:flex; align-items:center;

How to center an image in the middle of a div? [duplicate]

血红的双手。 提交于 2020-02-18 05:39:08
问题 This question already has answers here : How to make an image center (vertically & horizontally) inside a bigger div [duplicate] (36 answers) Closed 2 years ago . I need to center an image in a middle of a div. <div class="main"> <img...> </div> In the example below the image is centered, but not in the middle. https://jsfiddle.net/web_garaux/tng7db0k/ 回答1: Simple and easy method to do this, .test { background-color: orange; width: 700px; height: 700px; display:flex; align-items:center;

readbooks网页

元气小坏坏 提交于 2020-02-18 00:43:20
1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>Document</title> 6 <style type="text/css" media="screen"> 7 body,p,h1,h2,h3,dl,dd{ 8 margin: 0; 9 font-size: 100%; 10 font-weight: normal; 11 color: #3a4752; 12 13 } 14 body{ 15 background-color: #f2f5f7; 16 } 17 ul{ 18 margin: 0; 19 padding: 0; 20 } 21 li{ 22 list-style:none; 23 } 24 a{ 25 26 text-decoration: none; 27 color: #3a4752; 28 } 29 i{ 30 font-style: normal; 31 } 32 header{ 33 width: 100%; 34 background: #fff; 35 } 36 #header{ 37 display: -webkit-flex; 38 display: flex; 39 width: 1350px; 40 height: 78px;

Python Matplotlib 改变坐标轴的默认位置

五迷三道 提交于 2020-02-17 06:04:32
使用Matplotlib绘制的图表的默认坐标轴是在左下角的,这样对于一些函数的显示不是非常方便,要改变坐标轴的默认显示方式主要要使用gca()方法 plt.gca()表示 Get current axis,使用这个方法我们可以获得整张图表的坐标对象,这样我们就可以对坐标进行处理了,像移动位置,设置颜色之类的,类似plt.gcf()这个是 Get current figure 即获得当前图表的图像,对图像进行处理。 我们可以定义一个变量接收这个值: ax = plt.gca() 接下来还要了解一个方法 :spine() 这个单词的意思是脊梁,我的理解就是包围图表的线条,例如: 其余的两条边也是一样的道理,那么,如果我们要移动坐标到中心点,那么我们可以移动其中的两条边,并隐藏两条边即可: 隐藏两边 ax.spines[‘right’].set_color(‘none’) ax.spines[‘top’].set_color(‘none’) 指定坐标轴绑定 ax.xaxis.set_ticks_position(‘bottom’) ax.yaxis.set_ticks_position(‘left’) 这样写的结果是将x,y轴绑定到特定位置,至于这两个的值,其实试几次就好理解了,这种情况是坐标轴的交点是(0, 0) ax.spines[‘bottom’].set_position((