border

sass基础语法

我的梦境 提交于 2020-01-30 00:03:14
sass基础语法 !default 表示默认值 + 拼接字符串 #{ } 识别为变量名 demo.scss $width:300px; $height:300px; $color:#e03434; $baseWidth:200px; $baseWidth:100px !default; .div1{ width:$width; height:$height; background-color:$color; } .div2{ width:$baseWidth; height:$baseWidth; background-color:$color; } demo.css .div1 { width: 300px; height: 300px; background-color: #e03434; } .div2 { width: 200px; height: 200px; background-color: #e03434; } 变量作用域 内部变量只能在内部使用,否则会报错 demo.scss $width: 300px; $color: #ffe932; .div1 { height: $width; $widthInner: 100px; width: $widthInner; } .div2 { width: $width; } demo.css .div1 { height

c# TextBox border changes when it gets disabled compared to other disabled TextBox(es)

∥☆過路亽.° 提交于 2020-01-29 17:54:17
问题 I have a really strange problem. I have multiple TextBoxes for username/passwords, and a CheckBox beside every user/pass group. When user clicks on the CheckBox, and if he checked it, the username and password TextBox beside it become enabled and focus is set to username TextBox. If user unchecked the CheckBox the TextBoxes beside it become disabled. However the border of one TextBox stays different than other disabled TextBoxes. See: I've thought it was a focus problem, so I've changed the

移动端页面0.5px border的实现

主宰稳场 提交于 2020-01-29 15:52:18
移动端上经常发现1px边框异常的粗,因此,决定用伪类配合css3来实现0.5px边框 代码如下: 1 <!doctype html> 2 <html lang="en"> 3 <head> 4 <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"> 5 <meta charset="UTF-8"> 6 <title>0.5 border</title> 7 <style type="text/css"> 8 *{margin: 0;padding: 0;-webkit-box-sizing:border-box;} 9 ul{ 10 position: relative; 11 } 12 li{ 13 height: 60px; 14 line-height: 60px; 15 padding-left: 10px; 16 position: relative; 17 font-size: 20px; 18 } 19 li:after{ 20 content: ""; 21 display: block; 22 position: absolute; 23 left: -50%; 24 width: 200%; 25

CSS3

≡放荡痞女 提交于 2020-01-29 15:10:39
1、introduction 2、selector1 3、selector2 4、border&background1 5、border&background2 6、border&background3 7、text1 8、text2 9、box1 10、box2 11、box3 12、homework 13、transition 14、cubic-bezier 15、animation 16、animation2 17、step 18、step2 19、rotate 20、scale 21、skew 22、translate+perspective 23、perspective2 24、matrix 25、screen&px 26、gpu&layout CSS3响应式布局 CSS3炫酷转轴展开照片列表 3D酷炫动画特效 CSS3响应式布局项目开发 来源: https://www.cnblogs.com/lisalisalisa/p/12240351.html

怎么用javascript进行拖拽(转摘)

梦想与她 提交于 2020-01-29 11:30:04
*/ /*--> */ 本文译自:http://www.webreference.com/programming/javascript/mk/column2/index.html 所有版权归原文所有 由 sohotx.com 雪山老人翻译整理,转载请标明 Javascript的特点是dom的处理与网页效果,大多数情况我们只用到了这个语言的最简单的功能,比如制作图片轮播/网页的tab等等,这篇文章将向你展示如何在自己的网页上制作拖拽. 有很多理由让你的网站加入拖拽功能,最简单的一个是数据重组.例如:你有一个序列的内容让用户排序,用户需要给每个条目进行输入或者用select选择,替代前面这个方法的就是拖拽.或许你的网站也需要一个用户可以拖动的导航窗口!那么这些效果都是很简单:因为你可以很容易的实现! 网页上实现拖拽其实也不是很复杂.第一你需要知道鼠标坐标,第二你需要知道用户鼠标点击一个网页元素并实现拖拽,最后我们要实现移动这个元素. 样例- 拖拽页面元素 Item #1 Item #2 Item #3 Item #4 Item #5 Item #6 Item #7 Item #8 Item #9 Item #10 Item #11 Item #12 获取鼠标移动信息 第一我们需要获取鼠标的坐标.我们加一个用户函数到 document.onmousemove 就可以了: document

html基础--css基本属性

◇◆丶佛笑我妖孽 提交于 2020-01-29 10:59:56
HTML基础--css基本属性 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <!-- 指定编码 --> <title>liudaozhang</title> <link rel="shortcut icon" href="http://www.nnzhp.cn:80/wp-content/themes/QQ/images/logo.jpg"> <style> /*.c1{*/ /*height: 100px;*/ /*width: 100px;*/ /*border: red 2px solid;*/ /*text-align: center;*/ /*line-height: 100px;*/ /*}*/ /*text-align: center; 水平方向居中*/ /*line-height: 100px; chS方向居中*/ /*.c1{*/ /*height: 100px;*/ /*width: 100px;*/ /*border: red 2px solid;*/ /*float: right; ;*/ /*}*/ /*float:通过浮动可以将块及标签放到一行,相当于不同层,但是超过100%的宽度就会换行,*/ /*超过100%的宽度,是相对于外层div来判断的。 none:默认不浮动

SCSS和Sass有什么区别?

好久不见. 提交于 2020-01-28 04:52:11
根据我的阅读, Sass 是一种语言,它通过变量和数学支持使 CSS 更加强大。 SCSS有什么区别? 是否应该使用相同的语言? 类似? 不同? #1楼 基本区别是语法。 尽管SASS的语法宽松,带有空格,没有分号,但SCSS更类似于CSS。 #2楼 在萨斯 .sass 文件是从视觉上不同 .scss 文件,例如: Example.sass-sass是较旧的语法 $color: red =my-border($color) border: 1px solid $color body background: $color +my-border(green) Example.scss-sassy css是Sass 3以来的新语法 $color: red; @mixin my-border($color) { border: 1px solid $color; } body { background: $color; @include my-border(green); } 只需将扩展名从 .css 更改为 .scss 任何有效的CSS文档都可以转换为Sassy CSS(SCSS)。 #3楼 Sass是第一个,语法有点不同。 例如,包括一个混合: Sass: +mixinname() Scss: @include mixinname() Sass忽略花括号和分号,而是放在嵌套上

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 03:48:59
Javascript的特点是dom的处理与网页效果,大多数情况我们只用到了这个语言的最简单的功能,比如制作图片轮播/网页的tab等等,这篇文章将向你展示如何在自己的网页上制作拖拽. 有很多理由让你的网站加入拖拽功能,最简单的一个是数据重组.例如:你有一个序列的内容让用户排序,用户需要给每个条目进行输入或者用select 选择,替代前面这个方法的就是拖拽.或许你的网站也需要一个用户可以拖动的导航窗口!那么这些效果都是很简单:因为你可以很容易的实现! 网页上实现拖拽其实也不是很复杂.第一你需要知道鼠标坐标,第二你需要知道用户鼠标点击一个网页元素并实现拖拽,最后我们要实现移动这个元素. 获取鼠标移动信息 第一我们需要获取鼠标的坐标.我们加一个用户函数到document.onmousemove就可以了: document.onmousemove = mouseMove; function mouseMove(ev){ ev = ev || window.event; var mousePos = mouseCoords(ev); } function mouseCoords(ev){ if(ev.pageX || ev.pageY){ return {x:ev.pageX, y:ev.pageY}; } return { x:ev.clientX + document.body

HTML的select控件美化

随声附和 提交于 2020-01-28 03:01:54
HTML的select控件美化 CSS: .div-select { border: solid 1px #999; height: 40px; line-height: 40px; cursor: default; } .div-select-text { float: left; background-color: #fff; height: 100%; word-break: keep-all; overflow: hidden; cursor: default; } .div-select-text > div { padding: 3px; line-height: 34px; } .div-select-arrow { background-color: #fff; float: right; width: 40px; height: 100%; color: #999; cursor: default; } .div-select-arrow > div { border: solid 1px #999; margin: 2px; height: 34px; background-color: #f2f2f2; text-align: center; line-height: 34px; font-size: 22px; } .div-select-list {