border

Border-box CSS not working properly

↘锁芯ラ 提交于 2020-01-04 05:22:37
问题 I have the following code: http://www.designated.net.au/testbed/test/ body { margin:0; padding:0; width:100%; height:100%; background: #000000; } #page { margin:0% 10% 0% 10%; width:80%; height:1000px; border:solid #333333; border: 0 10px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; background: #fff; } As far as I know that should give me an inner border on the left and right of 10px, but instead I get a border inside the whole thing of about 2px. Any

Border-box CSS not working properly

左心房为你撑大大i 提交于 2020-01-04 05:22:26
问题 I have the following code: http://www.designated.net.au/testbed/test/ body { margin:0; padding:0; width:100%; height:100%; background: #000000; } #page { margin:0% 10% 0% 10%; width:80%; height:1000px; border:solid #333333; border: 0 10px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; background: #fff; } As far as I know that should give me an inner border on the left and right of 10px, but instead I get a border inside the whole thing of about 2px. Any

Delphi: Maximized Child Form in MDI Application

泪湿孤枕 提交于 2020-01-04 05:20:13
问题 How can I maximize a child window that fits only the client area but not an entire parent window? I don't want that the child window disappears under a main menu or other controls of the parent window. I have this code procedure WMSIZE(var Msg: TMessage); message WM_SIZE; procedure TForm2.WMSIZE(var Msg: TMessage); begin inherited; if Msg.WParam = SIZE_MAXIMIZED then begin ShowWindow(Handle, SW_RESTORE); Left := 0; Top := 0; Width := Form1.ClientWidth - 4; // The BORDER Height := Form1

Rounded border around plot in R

南笙酒味 提交于 2020-01-04 05:10:33
问题 I need to put smooth border around plot. code plot(0:10, 0:10, type="n", xlab="X", ylab="Y") box("figure", col="blue") instead of simple blue line, how i can put smooth grey line with rounded corners? many thanks. 回答1: library(grid) plot(0:10, 0:10, type="n", xlab="X", ylab="Y") grid.roundrect(gp=gpar(fill="#00000000", col="grey")) If you find the borders are being cut off, you can always reduce the size of the rounded rectangle: plot(0:10, 0:10, xlab="X", ylab="Y") grid.roundrect(height=0.99

Image border in Strict HTML using CSS

◇◆丶佛笑我妖孽 提交于 2020-01-04 04:52:09
问题 I have the following to display an clickable image (with no border) on a website: <a href="link"><img src="img" border="0" /></a> However this is not strict XHTML 1.0 so I changed it too: <img src="img" class="mystyle" /> And the CSS: mystyle img { border: 0px; } However this only works in Safari & Chrome and does not work in IE & FireFox. I understand that the w3 validators aren't necessary but was wondering if anyone has come across this and possibly a fix :) EDIT: Style was a typo, I meant

Change Border Color of a JButton in Java Swing preserving the insets

情到浓时终转凉″ 提交于 2020-01-04 02:15:08
问题 I want to change the border color of a JButton component in Java Swing. I have tried the following: package com.example.test; import java.awt.Color; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.BorderFactory; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; public class Test extends JFrame { public Test() { JPanel panel = new JPanel();

python 学习_第五模块 CSS(三)

感情迁移 提交于 2020-01-03 18:55:05
python 学习_第五模块 CSS(三) 一 定位 1.有几种定位 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>定位</title> </head> <body> <!-- position:static 静态 1.相对定位 position: relative; 2.绝对定位 position: absolute 3.固定定位 position:fixed --> <div></div> </body> </html> 2. 相对定位 相对定位:相对于自己原来的位置定位 现象和使用:   1.如果对当前元素仅仅设置了相对定位,那么与标准流的盒子什么区别。   2.设置相对定位之后,我们才可以使用四个方向的属性: top、bottom、left、right 特性:   1.不脱标   2.形影分离   3.老家留坑(占着茅房不拉屎,恶心人)   所以说相对定位 在页面中没有什么太大的作用。影响我们页面的布局。我们不要使用相对定位来做压盖效果 用途:   1.微调元素位置   2.做绝对定位的参考(父相子绝)绝对定位会说到此内容。 参考点:   自己原来的位置做参考点。 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>相对定位<

CSS盒模型

送分小仙女□ 提交于 2020-01-03 18:46:41
margin 外边距: 1、只写一个值: 表示四周的外边距均为指定的值; 2、写两个值: 第一个数为上下外边距 第二个数为左右外边距; 3、写三个值: 分别表示上、右、下三个方向,左边默认等于右边; 4、写四个值: 表示上、右、下、左 四条边顺时针方向; 5、 margin:0 auto; 设置块级元素,在父容器中水平居中!!!! 例如:margin:0px auto; padding 内边距: 设置方式,与margin完全相同; 注意:设置padding,将会导致div区域被撑大!!!使用时必须注意div实际的宽高为多少!!!!! 例如:padding: 100px; 边框 1、设置边框需要三个属性: 宽度 样式 颜色 。原则上,三个属性缺一不可,顺序可以随便修改 2、可以使用top、right、bottom、left分别设置四个边 例如:border: 10px dotted #0000FF; 当父盒子包裹子盒子,给子盒子添加margin-top时,子盒子与父盒子的上边线并不能分开,而是会导致,两个盒子同时下来。 [解决办法] 1、给父盒子添加一点padding-top; 不推荐使用,会导致父盒子结构多余1pxpadding; 2、给父盒子添加1px的border-top; 同样会导致1px的多余空间,不推荐使用; 3、给父盒子或者子盒子添加浮动; 可能会由于浮动

CSS元素的定位

穿精又带淫゛_ 提交于 2020-01-03 18:46:05
概述 网页布局的核心就是定位,盒模型是浏览器为页面中的每个HTML元素生成的矩形盒子;所以HTML页面实际上是由一堆盒子组成的,只不过在默认情况下,这些盒子边框是不可见的,背景也是透明的而已,这些盒子按照可见版式模型在Web页面上排布。 页面版式由三个属性控制:position属性、display属性、float属性 position属性:控制页面上元素间的位置关系 display属性:控制元素堆叠、并排、显示 float属性:控制组成多栏布局 盒子 Web页面中的每个盒子(元素)都有:边框(border)、内边距(padding)、外边距(margin) 边距(border):控制盒子边框的宽窄、样式、颜色 内边距(padding):控制盒子内容与边距间的距离 外边距(margin):控制盒子与盒子间的距离 每个盒子有四条边,所以与边框、内边距、外边距相关的属性也各有四个:上(top)、右(right)、下(bottom)、左(left) 边框 下面是一个段落元素的盒模型: 整个盒子的宽度等于我们设置的宽度300+左右内边距2*5 + 左右边距2*3=316 高度等于20+上下内边距2*5+上下边距2*3=36 边框有三个属性:宽度(border-width)、样式(border-style)、颜色(border-color) 宽度:可以使用thin、medium

CSS盒子模型

一世执手 提交于 2020-01-03 16:26:41
1、CSS盒子模型 在CSS盒子模型中,页面中的所有元素都可以看成是一个盒子,并且占据着一定页面的空间 1、内容区: 内容区是CSS盒子模型的中心,它主要呈现了盒子的主要内容比如文字,图案等,它是盒子的必备部分,其他三个是可选部分 content有三个属性:width、height、overflow。 注意这边的宽度和高度属性不包括padding,只是这块区域的宽高。当内容信息太多超过content所 占据的范畴,这时候就需要overflow属性来处理 2、内边距padding 这块区域是内容区和边框之间的空间,可以看做是内容区的背景区域 五个属性:padding-top、padding-left、padding-right、padding-bottom、padding(综合前面四个属性) ,五个属性可以指定内容与各个边框之间的距离。 3、边框border 边框的属性有三个:border-style、border-color、border-width 4、外边距margin 这块区域是指两个盒子之间的距离,它可能是子元素与父元素之间的距离,也可能是兄弟元素之间的距离 外边距的属性也有五个:margin-top、margin-left、margin-bottom、margin-right、margin(综合前面四个属性) 深入border Q:border:0与border