border

通过bootstrap来学习less

我是研究僧i 提交于 2020-01-11 08:28:53
  很早之前就听说过less了,但是一直拖着没去学习。最近抽空看了less,其实语法很简单,看一遍基本就知道怎么用了。平时自己写页面用less的话,感觉是方便了些,但是难道less的好处就只是这样?   刚好最近也在学习bootstrap,发现其源文件就是用less写的,看了之后,我才深深体会的less的好处与强大,对less也有了更深一层的理解。 1、 Less是什么?   LESS CSS是一种动态样式语言,属于CSS预处理语言的一种,它使用类似CSS的语法,为CSS的赋予了动态语言的特性,如变量、继承、运算、函数等,更方便CSS的编写和维护。   有些人可能没有接触过less,那我们就先可以简单的看看less的一些特性。 2、 语言特性快速预览: 变量: 变量允许我们单独定义一系列通用的样式,然后在需要的时候去调用。所以在做全局样式调整的时候我们可能只需要修改几行代码就可以了。 LESS源码: @color: #4D926F; #header { color: @color; } h2 { color: @color; } 编译后的CSS: #header { color: #4D926F; } h2 { color: #4D926F; } 混合(Mixins) 混合可以将一个定义好的class A轻松的引入到另一个class B中,从而简单实现class B继承class

(四)DIH导入结构化数据

…衆ロ難τιáo~ 提交于 2020-01-11 07:38:39
(四)DIH导入结构化数据   目前大多数的应用程序将数据存储在关系数据库(如oracle、sql server 、mysql等)、xml文件中。对这样的数据进行搜索是很常见的应用。所谓的DataImportHandler提供一种可配置的方式向solr导入数据,即可以一次全部导入,也可以增量导入。还可以声明式提供可配置的任务调度,让数据定时的从关系型数据库更新数据到solr服务器。 一、环境   1、windows 7   2、jdk1.8   3、tomcat8   4、solr7.1.0   5、mysql5.5  6、IK分词器(支持solr7的最优版本,ik低版本不支持solr7) 二、配置ik分词器   solr7.1中进行IK中文分词器的配置和solr低版本中最大不同点在于IK 分词器中jar包的引用。   一般的IK分词jar包都是不能用的(如:IKAnalyzer2012FF_u1.jar这种就不能用),因为IK分词中传统的jar不支持solr7.1这个高版本的,所以就会发送运行错误的界面。   下面的这个错误是血淋漓的教训。 solr7.1下IK中文分词器的安装配置。   1、下载支持solr7.1的IK版本   下载solr7.1专用的IK 分词器的jar包和相应的配置文件。   2、拷贝jar文件到 solr项目下的WEB-INF\lib目录  

CSS circle with two borders of different colors or at least looks like [duplicate]

我与影子孤独终老i 提交于 2020-01-11 05:35:49
问题 This question already has answers here : Circle with two borders (4 answers) Closed 4 years ago . I have a circle with one border, but I would like to know if there is anyway to achieve a circle with two borders of different colors. I have following CSS producing circle as follows: .circle { width: 20px; height: 20px; border-radius: 12px; border: 1.5px solid #fff; font-family: Cambria; font-size: 11px; color: white; line-height: 20px; text-align: center; background: #3E78B2; } .circle:hover {

Create a border outside the circular ImageView

我与影子孤独终老i 提交于 2020-01-11 04:15:16
问题 I have created a circular ImageView , but I need to add a border outside the image. Here is the code: Bitmap circleBitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888); BitmapShader shader = new BitmapShader (bitmap, TileMode.CLAMP, TileMode.CLAMP); Paint paint = new Paint(); paint.setShader(shader); paint.setAntiAlias(true); paint.setFilterBitmap(true); paint.setDither(true); paint.setColor(Color.parseColor("#BAB399")); Canvas c = new Canvas(circleBitmap); c.drawARGB(0, 0, 0, 0);

HTML中使用Lodop打印

徘徊边缘 提交于 2020-01-11 01:34:15
我们在项目中,会需要用到连接打印机进行打印订单数据信息等,本次我使用的是 Lodop 进行打印 我们会用到 Lodop 的依赖文件 1、安装软件 CLodop_Setup_for_Win32NT.exe 2、32版本的运行文件 install_lodop32.exe 3、64版本的运行文件 install_lodop64.exe 4、JS文件 LodopFuncs.js 以上文件已经放在百度网盘: 链接:https : / / pan . baidu . com / s / 1 JZkTy5iomrPw - iYcr27XWg 提取码:vpod 一、根据项目实际情况,将 LodopFuncs.js 文件中的路径修改正确 文件第62行,function getLodop(oOBJECT, oEMBED) {},方法里面的每个 href 改为你项目中正确的路径,供用户打印时下载安装 二、提供打印按钮 < button class = "btn_own btn_toolbar btn-purple no-border" href = "#" id = "btn_print" onclick = "printOwn()" style = "border-width: 0;" > < i class = "glyphicon glyphicon glyphicon-print blue"

CSS盒子模型+box-sizing

早过忘川 提交于 2020-01-10 21:56:17
当对文档进行布局时,浏览器渲染引擎会根据css-Box模型(CSS Basic Box model)将所有元素表示为一个矩形盒子。CSS决定这些盒子的大小,位置以及属性(颜色,背景,边框尺寸) 标准盒模型 从外向内依次为: Margin + border + padding + content-width 外边距区域 margin area 用空白区域扩展边框区域,以分开相邻的元素。它的大小为 margin-box 的高宽。外边距区域大小由 margin-top , margin-right , margin-bottom , margin-left 及简写属性 margin 控制。 边框区域border area 是包含边框的区域,扩展了内边距区域。它位于边框边界内部,大小为 border-box 宽和 border-box 高。由 border-width 及简写属性 border 控制。 内边距区域padding area 延伸到包围padding的边框。如果 内容区域content area 设置了背景、颜色或者图片,这些样式将会延伸到padding上(译者注:而不仅仅是作用于内容区域) 。 它位于内边距边界内部, 它的大小为 padding-box 宽与 padding-box 高。 内容区域content area 是包含元素真实内容的区域。它通常包含背景

W3c盒子模型+IE盒子模型+box-sizing属性

天涯浪子 提交于 2020-01-10 21:55:58
1.盒子模型有两种,标准盒模型和IE盒模型,其中W3C标准的盒模型就是在网页的顶部加上 DOCTYPE 声明。 (1)W3C标准的盒模型 W3C盒子模型包括4部分:margin,border,padding,content,其中,content不包括其他部分,下面内容(content)部分为蓝色的部分,不包含其他。 w3c中的盒子模型的宽:包括margin+border+padding+width;(width为content的宽度) width:margin*2+border*2+padding*2+width; 对应上面的公式,下图中为盒子模型的总宽度为0+1*2+10*2+98 高度同宽度的计算方式: height:margin*2+border*2+padding*2+height; 对应上面的公式,下图中为盒子模型的总高度为0+1*2+5*2+18 (2)IE盒模型 在IE盒模型中,计算总宽度和高度的方法是一样的,但是IE盒模型中,content部分的宽度width和高度height是不一样的。content的内容包括padding和border和content IE和模型中content的宽度:content+padding*2+border*2 标准盒子模型中,width和height是content的长与宽 而IE盒子模型中,width和height是content

CSS盒模型

北城以北 提交于 2020-01-10 21:49:22
简单的说页面是由若干个盒模型(BOX)堆砌起来的,可以说每个HTML元素就是一个盒模型 盒模型由外到内包括边距(margin)、边框(border)、填充(padding)、内容(content) 在页面中所占的实际宽度是margin + border + paddint + content 的宽度总和 盒子模型有两种分别是W3C标准模型和IE模型 不同之处: 标准模型宽高是指content,不包括padding和border IE模型的宽高是指content+padding+border的总宽高 个人认为IE盒子模型比较合理,元素的宽度应该包含border(边框)和padding(填充) CSS通过box-sizing的content-box 和 border-box两个属性可以设置这两种盒子模型 设置标准盒模型:content-box 元素的width=content+padding+border .test{ box-sizing:content-box; width:200px; padding:10px; border:15px solid #eee; } 设置IE盒模型:border-box 元素的width=width(用样式指定的宽度) .test1{ box-sizing:border-box; width:200px; padding:10px; border

设置div中的div居中显示

一世执手 提交于 2020-01-10 20:10:39
设置div中的div居中显示 方法一、 <div class='big'> <div class='small'>box1</div> </div> style样式: .big{ height:200px; width:200px; border:black solid 1px; position:absolute; left:150px; } .small{ height:100px; width:100px; background-color:green; position:relative; left:100px; top:100px; margin-top:-50px; margin-left:-50px; border:black solid 1px; } 方法二、 div class='big2'> <div class='small2'>box3</div> </div> .big2{ height:200px; width:200px; border:black solid 1px; text-align:center; } .small2{ height:100px; width:100px; background-color:green; margin:50px auto; //外面的div高度的一半 border:black solid 1px; } 来源:

how to make a gradient border of UIView?

白昼怎懂夜的黑 提交于 2020-01-10 08:52:10
问题 I want to make a gradient border of view like the following picture: but I don't know how do it exactly , i.e. what the gradient color I should use to do it? how to set my view to show a border like the image? I'm using the following code to get a border: self.view.layer.borderColor = [UIColor orangeColor].CGColor; self.view.layer.borderWidth = 2.0f; 回答1: This what i did and it worked perfectly extension CALayer { func addGradienBorder(colors:[UIColor],width:CGFloat = 1) { let gradientLayer =