display

A. Display The Number

▼魔方 西西 提交于 2020-01-31 01:15:52
time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You have a large electronic screen which can display up to 998244353998244353 decimal digits. The digits are displayed in the same way as on different electronic alarm clocks: each place for a digit consists of 77 segments which can be turned on and off to compose different digits. The following picture describes how you can display all 1010 decimal digits: As you can see, different digits may require different number of segments to be turned on. For example, if you want to display 11,

清除浮动方法

半腔热情 提交于 2020-01-30 03:02:35
1.添加额外标签设置clear:both属性 <div style="clear:both"></div> 2.使用 br标签和其自身的 html属性 3.父元素设置 overflow的非 visible 值(overflow:auto/overflow:hidden) 4.父元素也设置浮动 float:left 5.父元素设置display:table display:table 6.使用:after 伪元素 .clearfix:after{ content : "." ; clear:both;overflow:hidden;display:bolck;height:0;visibility:hidden } .clearfix{*zoom:1;}/* 激活IE 6,7的haslayout*/ 7.在 IE 6/7 的标准文档模式中设置 “width/height/zoom” 等样式来自动清理浮动。 通过 为知笔记 发布 来源: https://www.cnblogs.com/zjx2011/archive/2012/09/14/2684891.html

display:none和visible:hidden区别

隐身守侯 提交于 2020-01-29 04:15:16
(忘记在哪里参考的了,如果需要注明出处,请私信) 1、display:none和visible:hidden都能把网页上某个元素隐藏起来。 2、但两者有区别: ●display:none —不为被隐藏的对象保留其物理空间,即该对象在页面上彻底消失,通俗来说就是看不见也摸不到。 ●visible:hidden— 使对象在网页上不可见,但该对象在网页上所占的空间没有改变,通俗来说就是看不见但摸得到。 1、visibility: hidden----将元素隐藏,但是在网页中该占的位置还是占着。 2、display: none----将元素的显示设为无,即在网页中不占任何的位置。 3、例如有三个table,将中间的一个table hidden掉,你会发现在那个被hidden的table看不见了,但是,中间会留有很大的一空白,而这个空白就是这个table没有被隐藏时所占的位置。 4、而none的作用更像是把元素从网页中“去除”(当然不是真的去除,只是效果是如此) 5、例如有三个table,将中间的一个table none掉,你会发现在剩下的两个table中间不会有任何的空白。就好像中间的那个table从来不存在过一样。 来源: CSDN 作者: 檀小泡泡 链接: https://blog.csdn.net/weixin_42371145/article/details/104061447

居中的最佳方法 在垂直和水平页面上? [重复]

大憨熊 提交于 2020-01-28 05:23:45
这个问题已经在这里有了答案 : 如何水平和垂直居中放置元素 (19个答案) 11个月前 关闭。 在页面上垂直和水平居中放置 <div> 元素的最佳方法? 我知道 margin-left: auto; margin-right: auto; margin-left: auto; margin-right: auto; 会以水平为中心,但是垂直进行的最佳方法是什么? #1楼 这个解决方案对我有用 .middleDiv{ position : absolute; height : 90%; bottom: 5%; } (或高度:70%/底部:15% 高度:40%/底部:30%...) #2楼 最好,最灵活的方式 我 在dabblet.com上的演示 该演示的主要技巧是元素的正常流动是从上到下,因此 margin-top: auto 设置为零。 但是,绝对放置的元素在分配自由空间方面的作用相同,并且类似地可以在指定的 top 和 bottom 垂直居中(在IE7中不起作用)。 此技巧适用于任何大小的 div 。 div { width: 100px; height: 100px; background-color: red; position: absolute; top:0; bottom: 0; left: 0; right: 0; margin: auto; } <div></div

Python爬虫(一)

こ雲淡風輕ζ 提交于 2020-01-28 04:26:28
本教程基于Python3.6,Mac OS系统,Pycharm编辑器 使用urllib库可以获取网页,示例代码如下 1 from urllib import request 2 3 #要爬取的网页,这里以百度为例 4 url = 'http://www.baidu.com/' 5 6 #构建请求对象Request 7 res = request.Request(url) 8 9 #发起请求,得到请求结果,命名为response 10 response = request.urlopen(res) 11 12 #读取结果,命名为html 13 html = response.read() 14 15 #打印查看结果 16 print(html) 可以看到打印的结果为 /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 /Users/pn/Desktop/Python/blog/demo.py b'<!DOCTYPE html>\n<!--STATUS OK-->\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n

JavaScript实现多栏目切换效果

北战南征 提交于 2020-01-28 04:15:17
<style> .news_wrap{ width: 380px; height: 266px; float: left; margin-left: 15px; } .news_head{ width: 380px; border-bottom: 2px solid #dedede; height: 51px; line-height: 51px; } .tabList ul li{ float: left; cursor: pointer; font-weight: bold; text-align: center; font-size: 16px; width: 72px; } .cli1{ color: #3a7aaf; border-bottom: 2px solid #3a7aaf; } .more{ font-size: 14px; color: #9a9a9a; float: right; font-weight: normal; padding-right: 0; } .tabCon{ width: 376px; padding-top: 13px; overflow: hidden; } </style> <div class="news_wrap"> <div class="news_head"> <div class="tabList"> <ul> <li

display:inline-block 产生空隙问题

ぐ巨炮叔叔 提交于 2020-01-27 22:39:31
Display:inline-block 产生空隙问题 1.产生原因:元素之间的空白符(空格、回车换行等)都会被浏览器处理,根据white-space的处理方式(默认是normal,合并多余空白),原来HTML代码中的回车换行被转成一个空白符,在字体不为0的情况下,空白符占据一定宽度,所以inline-block的元素之间就出现了空隙。这些元素之间的间距会随着字体的大小而变化,当行内元素font-size:16px时,间距为8px。 2.解决方法1: 父元素添加: .par { display : table ; word-spacing : -1em ; } 解决方法2:消除html代码中的空白 < div class = " par " > < span > aaa </ span > < span > bbb </ span > </ div > 来源: CSDN 作者: lllanlll 链接: https://blog.csdn.net/qq_24270109/article/details/104094920

PythonOCC基础使用:点的性质(glsl定义)

夙愿已清 提交于 2020-01-27 14:39:44
此处用于定义点的性质(例如起点,落定点,中心点等) import sys from OCC . Core . gp import gp_Pnt from OCC . Core . Geom import Geom_CartesianPoint from OCC . Core . Quantity import Quantity_Color , Quantity_TOC_RGB from OCC . Core . Aspect import ( Aspect_TOM_POINT , Aspect_TOM_PLUS , Aspect_TOM_STAR , Aspect_TOM_X , Aspect_TOM_O , Aspect_TOM_O_POINT , Aspect_TOM_O_PLUS , Aspect_TOM_O_STAR , Aspect_TOM_O_X , Aspect_TOM_RING1 , Aspect_TOM_RING2 , Aspect_TOM_RING3 , Aspect_TOM_BALL ) from OCC . Core . AIS import AIS_Point from OCC . Core . Prs3d import Prs3d_PointAspect , Prs3d_Drawer from OCC . Display . SimpleGui

CSS的总结

情到浓时终转凉″ 提交于 2020-01-27 04:19:39
1.如果利用<img>标签把图片放进表格单元里面,并注意到在图片下方有不需要的空间,那么设置它的display属性为block. 2.text-align可以被继承,vertical-align属性不会被继承 3.html提供<colgroup>和<col>标签相应地表示列组合和独立的列。 表格中的每个列都包括一个<col>标签,可以用类或ID来识别它们。只有两组属性对这些标签起作用:width和background属性。 <colgroup> <col id="brand"/> <col id="price"/> <col id="power"/> </colgroup> 4.IE6.0兼容支持透明背景 * html .tit2 .ms{ zoom:1; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src="http://hszy00232.blog.163.com/blog/images/jia.png",sizingMethod="scale"); background:none;} 5.浏览器兼容处理半透明效果 dd{width:215px; height:20px;background:#000; filter:alpha(opacity=70); opacity:0.7

50道 CSS 经典题

我是研究僧i 提交于 2020-01-27 02:54:36
1 介绍一下标准的CSS的盒子模型?与低版本IE的盒子模型有什么不同的? 标准盒子模型:宽度=内容的宽度(content)+ border + padding + margin 低版本IE盒子模型:宽度=内容宽度(content+border+padding)+ margin 2 box-sizing属性? 用来控制元素的盒子模型的解析模式,默认为content-box context-box:W3C的标准盒子模型,设置元素的 height/width 属性指的是content部分的高/宽 border-box:IE传统盒子模型。设置元素的height/width属性指的是border + padding + content部分的高/宽 3 CSS选择器有哪些?哪些属性可以继承? CSS选择符:id选择器(#myid)、类选择器(.myclassname)、标签选择器(div, h1, p)、相邻选择器(h1 + p)、子选择器(ul > li)、后代选择器(li a)、通配符选择器(*)、属性选择器(a[rel=”external”])、伪类选择器(a:hover, li:nth-child) 可继承的属性:font-size, font-family, color 不可继承的样式:border, padding, margin, width, height 优先级(就近原则):