padding

CSS3新增UI样式

不打扰是莪最后的温柔 提交于 2020-01-03 15:58:04
1、圆角:border-radius 1个:都一样 border-radius: 一样 2个:对角 border-radius: 左上&右下 右上&左下 3个:斜对角 border-radius: 左上 右上&左下 右下 4个:全部,顺时针 border-radius: 左上 右上 右下 左下 border-radius: 1-4个数字 / 1-4个数字——前面是水平半径,后面是垂直半径border-radius: 10px/5px; 不给“/”则水平和垂直一样 2、边框 (1)边框图片:border-image border-image-sourceg 引入图片 border-image-slice 切割图片 border-image-width 边框宽度 border-image-repeat 图片的排列方式: round 平铺,repeat 重复,stretch拉伸 (2)边框颜色 border-colors(火狐下) 3、线性渐变 (1)格式 线性渐变格式 linear-gradient([<起点> || <角度>] ?<点>, <点>…) 只能用在背景上 (2)参数 起点:从什么方向开始渐变 默认:top left(左上角) 角度:从什么角度开始渐变 xxx deg的形式(逆时针旋转) 点:渐变点的颜色和位置 black 50%,位置可选 (3)实例:background

jquery and js

不羁岁月 提交于 2020-01-03 14:55:51
一、window对象表示浏览器中打开的窗口 二、window对象可以省略 一、document对象是window对象的一部分 二、浏览器的HTML文档成为Document对象 window.location和document.location window对象的location属性引用的是Location对象 表示该窗口中当前显示文档的URL. document的对象的location属性也是引用了Location对象 window.location===document.location //true javascript的高宽 window.innerWidth window.innerHeight window.outerWidth window.outerHeight window.screen.height window.screen.width widow.screen.availHeight window.screen.availWidth window.screenTop window.screenLeft document.body.clientWidth document.body.clientHeight document.body.clientLeft document.body.cilentTop 假如无padding无滚动 clientWeigth

纯css实现的三级水平导航菜单

試著忘記壹切 提交于 2020-01-03 14:03:52
vscode练习使用开发纯css的三级水平导航菜单。先上图: 1、html5布局 1 <html> 2 3 <head> 4 <meta charset="UTF-8"> 5 <title>水平导航菜单</title> 6 <link rel="stylesheet" href="reset.css"> 7 <link rel="stylesheet" href="style.css"> 8 </head> 9 10 <body> 11 <header class="header"> 12 <nav class="menu radius"> 13 <ul class="nav"> 14 <li><a href="#">首页</a></li> 15 <li> 16 <a href="#">菜单项</a> 17 <ul> 18 <li> 19 <a href="#">二级菜单项</a> 20 <ul> 21 <li><a href="#">三级菜单项</a></li> 22 <li><a href="#">三级菜单项</a></li> 23 <li><a href="#">三级菜单项</a></li> 24 <li><a href="#">三级菜单项</a></li> 25 <li><a href="#">三级菜单项</a></li> 26 </ul> 27 </li> 28 <li>

仿iphone日历插件(beta)

巧了我就是萌 提交于 2020-01-03 10:20:00
前言 小伙伴们好,很久不见了。最近工作进入正常期了,所以慢慢的悠闲的时间久没有了,所以不能每天水一篇了。 最近也在听师傅( http://home.cnblogs.com/u/aaronjs/ )的教导开始阅读jquery源码了,怎么说呢,阅读的效果其实不是太好。 一来是时间断断续续的没有接上,今天读完明天又忘了,到第三天再读的话,就很多都忘记了; 二来是jquery其实还是有一定难度,加之篇幅也很长,所以读起来还是有一点吃力(我甚至有时候有种想睡的感觉),过了2星期才陆陆续续把core读完,结果很多都无法理解,再加油吧。 反正今年的目标就是把jquery读懂,时间多,不着急了。 时间比较紧未做兼容处理,请使用手机/或者使用chrome开启touch功能查看,后期补上兼容方案,以及修复BUG 关于工作 最近工作上需要在我们的网页上加入一些动画: ① 页面的切入切出的转场动画 ② 模仿一个iphone的日历控件 转场动画做的时候其实碰到了很多坑,而且最后做出的效果也一般,因为既有的框架与dom结构已经出来了好久了,改不得,而且就算改了效果也不能保证好,所以暂时放下 这里说的仿iphone日历控件,不如说模仿一个单选框来的实在,而且我这里说是 插件 ,完全就算标题党了,各位可以忽视,所以今日正题吧。 iphone的感觉 第一步我们要找到iphone的感觉,那么iphone是个什么感觉呢

CSS

僤鯓⒐⒋嵵緔 提交于 2020-01-03 10:08:11
阅读目录 css介绍 css的引入方式 css选择器 盒模型 标准文档流 块级元素和行内元素 浮动 定位 z-index 文本属性和字体属性 background 回到顶部 CSS介绍 现在的互联网前端分三层: HTML:超文本标记语言。从 语义 的角度描述页面 结构 。 CSS:层叠样式表。从 审美 的角度负责页面 样式 。 JS:JavaScript 。从 交互 的角度描述页面 行为 CSS:Cascading Style Sheet,层叠样式表。CSS的作用就是给HTML页面标签添加各种样式, 定义网页的显示效果 。简单一句话:CSS将网页 内容和显示样式进行分离 ,提高了显示功能。 css的最新版本是css3, 我们目前学习的是css2.1 接下来我们要讲一下为什么要使用CSS。 HTML的缺陷: 不能够适应多种设备 要求浏览器必须智能化足够庞大 数据和显示没有分开 功能不够强大 CSS 优点: 使数据和显示分开 降低网络流量 使整个网站视觉效果一致 使开发效率提高了(耦合性降低,一个人负责写html,一个人负责写css) 比如说,有一个样式需要在一百个页面上显示,如果是html来实现,那要写一百遍,现在有了css,只要写一遍。现在,html只提供数据和一些控件,完全交给css提供各种各样的样式。 回到顶部 CSS的引入方式 行内样式 <div> <p style=

Chrome vertical jump when refreshing page scrolled to bottom

邮差的信 提交于 2020-01-03 09:54:42
问题 In noticed the following behavior when developing a website using Chrome: when I refresh the page while it's being scrolled fully to bottom I can observe a vertical jump. See the following Bootply. To reproduce, open the fullscreen preview (the monitor icon on the right), and try the following: refresh the page (confirm form resubmission) --> no jump scroll to middle, refresh (confirm form resubmission) --> no jump scroll to very bottom, refresh (confirm form resubmission) --> vertical jump

paragraph “<p>” padding not applied

我只是一个虾纸丫 提交于 2020-01-03 08:38:11
问题 The following three pieces of code behave exactly the same: <p {padding: 0 15 0 15}> A paragraph of text here... </p> <p> A paragraph of text here... </p> <p style="padding: 0 15 0 15"> A paragraph of text here... </p> How do I get the paragraph indented on both sides? (I tried 15px instead of 15 (EDIT - but only on the first two), I also tried separating the numbers with commas, like an example I found on Google.) The above code is in a div which is in the body, no other divs or tables, etc.

Padding in ImageView is not Working

做~自己de王妃 提交于 2020-01-03 07:32:21
问题 I want to make a screen which contains a top bar and an image. I use TextView for the top bar and ImageView for the image. I want to set padding only to the image view. My xml is given below. The padding action is not working. Can anybody explain why and what to do? <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable

How to pad NSString with spaces?

◇◆丶佛笑我妖孽 提交于 2020-01-03 07:17:21
问题 For example, I need the NSString have at least 8 chars....instead of using a loop to add the left pad spaces on this, is there anyway to do it? Examples: Input: |Output: Hello | Hello Bye | Bye Very Long |Very Long abc | abc 回答1: Here is an example of how you can do it: int main (int argc, const char * argv[]) { NSString *str = @"Hello"; int add = 8-[str length]; if (add > 0) { NSString *pad = [[NSString string] stringByPaddingToLength:add withString:@" " startingAtIndex:0]; str = [pad

了解HTML表单之13个表单控件

假装没事ソ 提交于 2020-01-03 06:57:19
前面的话   input元素无疑是一个庞大和复杂的元素,但它并不是唯一的表单控件。还有button、select、option、 label、 optgroup、textarea、fieldset、 legend 这 八 个传统表单控件,datalist、progress、meter、output、keygen这五个新增表单控件 传统控件    button       定义一个按钮    select        定义一个下拉列表    option       定义下拉列表中的一个选项    optgroup      定义选项组,用于组合选项    textarea      定义多行的文本输入控件    fieldset       分组表单内的相关元素    legend       定义fieldset元素的标题    label        定义input元素的标注 button   button元素用来定义一个按钮,button元素内部可以放置文本或图像或其他多媒体内容。但唯一禁止使用的元素是图像映射,因为它对鼠标和键盘敏感的动作会干扰表单按钮的行为   始终为button元素设置type属性,IE7-浏览器的默认类型是button,而其他浏览器的默认类型是submit   IE7-提交button元素之间的文本,而其他浏览器则会提交value属性的内容