text-align

Vue实现的简单选项卡

允我心安 提交于 2019-12-06 05:36:00
vue-tab-demo App.vue < template > < div id = "app" > < Tab /> </ div > </ template > < script > import Tab from './components/Tab' export default { name: 'App' , components: { Tab } } </ script > < style > ul , li { list-style : none ; } .clearfix { zoom : 1 ; } .clearfix :after { display : block ; content : '' ; clear : both ; } </ style > 先布局,写好样式 Tab.vue < template > < div id = "tab" > < div class = "tab-bar clearfix" > < a href = "javascript:;" > HTML </ a > < a href = "javascript:;" > CSS </ a > < a href = "javascript:;" > JavaScript </ a > < a href = "javascript:;" class = "active" > Vue

周六的html学习

有些话、适合烂在心里 提交于 2019-12-06 04:48:50
导航栏的设计准备让他固定在页面的顶端,然后可以隐藏这样子的设置position属性为fixed,然后设定各项参数即可。 .menu{ position: fixed; left: 0; right: 0; top: 0; margin: 0; /* 区别于relative,fixed各种参数需要手动设置 */ text-align:center; background-color: white; } 透明度变化,在hover中设置opacity参数,为了不瞬间变化在初始设置时加入 transition: opacity .5s ease-in-out; 达到淡入淡出的效果 运行后发现整个导航栏都会淡入淡出,看起来很费眼睛,所以专门做另一个负责淡入淡出透明变化的导航栏 原先的就把他直接设置成高度0防止挡住menubar的判定区域 但是menu-item的高度还是存在,所以要让他屏蔽鼠标事件,以及超链接可以响应鼠标事件 .menu li.menu-item{ line-height:50px; width: 80px; display:inline-block; margin:0 20px 0 0; pointer-events: none; } .menu li.menu-item a{ text-align: center; text-decoration: none; color

页面Tab切点击切换

让人想犯罪 __ 提交于 2019-12-06 04:46:08
一直对于JS、jquery比较生疏,苦于在前端路上一直是孤军奋斗,没人学习交流,全靠自己琢磨。上家公司时抽了一些空余时间对于js、jquery的基本知识进行了一些系统的自学,并没有实际去写一些相关的项目,但自我感觉已经掌握了不少了,在这种自我感觉良好的情况下跳槽到了现在的公司:有货,主要工作内容就是活动pc及app页面的是制作,添加链接,基础到不行的工作。上次的活动需要写个Tab切,心想还是有点自学基础的我就开始动手写了,结果,挫败感很强啊,一个简单的tab切换效果写起来错误百出,下面是我一开始的代码: CSS部分: .tab_head { width : 100 % ; margin : 0 auto ; position : relative ; } .tab_head a { position : absolute ; display : block ; cursor : pointer ; } .tab_head_bg { display : block ; } .tab_head_bg img { display : block ; width : 100 % ; } HTML部分: < div > <!--tab头部--> < div class = "tab_head" > < a class = "tab1" style = "width: 23.5%;

pandas 之 索引重塑

扶醉桌前 提交于 2019-12-05 20:22:49
import numpy as np import pandas as pd There are a number of basic operations for rearanging tabular data. These are alternatingly referred to as reshape or pivot operations. 多层索引重塑 Hierarchical indexing provides a consistent way to rearrange data in a DataFrame. There are two primary actions: stack - 列拉长index ​ This "rotates" or pivots from the columns in the data to the rows. unstack ​ This pivots from the rows into the columns. ​ I'll illustrate these operations through a series of examples. Consider a small DataFrame with string arrays as row and column indexes: ​ data = pd.DataFrame(np

pandas 之 数据合并

故事扮演 提交于 2019-12-05 15:43:24
import numpy as np import pandas as pd Data contained in pandas objects can be combined together in a number of ways: pandas.merge connects rows in DataFrame based on one or more keys. This will be familiar to users of SQL or other relational databases, as it impliemnts(工具) database join oprations. pandas.concat concatenates or "stacks" together objects along an axis. The combine_first instance method enables splicing(拼接) together overlapping data to fill in missing values in one object with values from another. I will address each of these and give a number of examples. They'll be utilized in

CSS text-align delay with width animation

China☆狼群 提交于 2019-12-05 14:01:39
I am trying to animate my text to appear from left to right on page load. This is done by simply setting @keyframes to transition from 0% max-width to 100%. However my text-align settings seem to be applied only after the animation is complete. I just want the text content itself to reveal itself where I intend it to be, and assumed my code is correct. Am I missing something obvious here? I'm fairly new to CSS , but my research doesn't seem to indicate there are inherit properties of animation or text-align that should cause this. Code example below. Thanks! @keyframes leftright { 0% { max

pandas 之 多层索引

荒凉一梦 提交于 2019-12-05 12:38:03
In many applications, data may be spread across a number of files or datasets or be arranged in a form that is not easy to analyze. This chapter focuses on tools to help combine, and rearrange data. (在许多应用中,数据可以分布在多个文件或数据集中,或者以不易分析的形式排列。 本章重点介绍帮助组合和重新排列数据的工具.) import numpy as np import pandas as pd 多层索引 Hierarchical indexing is an important featuer of pandas that enables you to have multiple(two or more) index levels on an axis . Somewhat abstractly, it provides a way for you to to work with higher dimensional data in a lower dimensional form.(通过多层索引的方式去从低维看待高维数据). Let's start with a simple

Can I use CSS to justify text with hyphenating words at the end of a line?

让人想犯罪 __ 提交于 2019-12-05 06:06:44
I have a div that is too narrow to text-align:justify (gaps too wide), but yet looks un-uniform when right- or left-justified, because then there is a large gap at the end of lines. Left-justified looks best, but could I use hyphenation, like in books? Using CSS? You can use hyphens: auto provided that you have declared the content language in HTML, e.g. using <html lang=en-US> . Browser support is still limited but getting better, see http://caniuse.com/css-hyphens For good quality, you may need to manually control hyphenation e.g. by using soft hyphens ( ­ ) in words that might otherwise be

pandas 之 特征工程

孤街醉人 提交于 2019-12-05 05:13:59
import numpy as np import pandas as pd So far(到目前为止) in this chapter we've been concerned with rearranging data. Filterng, cleaning, and other transformations are another class of important oprations. 数据去重 Duplicate rows may be found in a DataFrame for any number of reasons. Here is an example: data = pd.DataFrame({ 'k1': ['one', 'two']*3 + ['two'], 'k2': [1, 1, 2, 3, 3, 4, 4] }) data */ /*--> */ k1 k2 0 one 1 1 two 1 2 one 2 3 two 3 4 one 3 5 two 4 6 two 4 The DataFrame method duplicated returns a boolean Series indcating whether each rows is a duplicate (has been observed in a previous row)

css的repaint和reflow

旧街凉风 提交于 2019-12-05 04:38:08
简单理解 :repaint主要是针对某一个DOM元素进行的重绘,reflow则是回流,针对整个页面的重排。字面意思来说:repaint就是重绘,reflow就是回流。repaint和reflow的目的是:展示一个新的页面样貌。 性能消耗: 在性能优先的前提下,性能消耗 reflow大于repaint。 体现: repaint是某个DOM元素进行重绘;reflow是整个页面进行重排,也就是页面所有DOM元素渲染。 触发时机: style变动造成repaint和reflow。 不涉及任何DOM元素的排版问题的变动为repaint,例如元素的color/text-align/text-decoration等等属性的变动。 除上面所提到的DOM元素style的修改基本为reflow。例如元素的任何涉及长、宽、行高、边框、display等style的修改。 常见触发场景: 触发repaint: color的修改,如color=#ddd; text-align的修改,如text-align=center; a:hover也会造成重绘。 :hover引起的颜色等不导致页面回流的style变动。 等等太多,一时间写出来也太难想了。 触发reflow: width/height/border/margin/padding的修改,如width=778px; 动画,:hover等伪类引起的元素表现改动