Heard it for 13 years, i have gone through all of it, after 3 days. How many 3 days past, in the pasting 13 years?
Thanks to xiaoli.li, thanks to Xinshengdaxue.
2016.7.9
responsive website
- use framework w3.css
- use framework Bootstrap.
- the temps are amazing .
@media
@media screen and (min-width: 480px)
is often used.
flex
display:flex
justify-content:space-around/space-between
is cool.- use flex to implementing the responsive website.
box-sizing
not really understand the meanin of box-sizing: border-box;
. if this is true, what’s the meaning of padding ? margin?
CSS3 Multiple Columns
- syntax: keyword?
- frequent used methods?
- amazing things?
- questions?
too young to be used widely.
Button
- 3 methods of button.
<a>
<input type="button"
<button >
- just one
transition-duration: 0.4s;
makes the:hover
animatedly. ul.breadcrumb li+li:before
this is cool.filter
- image filter, fucking amazing.
animation
- keyframes hold the centain style of elements at certain times;
- animation changes nothing, but show the process. what to do if change the property when animation finished.
- :hover + transition:0.3 change the box-shadow animatedly.
- in this example,, i don’t understand the
transform:translate(-50%,-50%)
transition
- the transition is nice and easily use in H5.
transform 2D / 3D
tanslate()
rotation(20deg)
transform: scale(2, 3);
- a little silly of the parameter sequence of
matrix()
matrix(scaleX(),skewY(),skewX(),scaleY(),translateX(),translateY()):
- rotateZ() and rotate() have the same effect.
font
speficy the font used from net.
1
2
3
4@font-face {
font-family: myFirstFont;
src: url(sansation_light.woff);
}the bold font can be specified separately.
1
2
3
4
5@font-face {
font-family: myFirstFont;
src: url(sansation_bold.woff);
font-weight: bold;
}
word wrap
- word-wrap:break-work;
shadow!!
text-shadow: 0 0 3px #FF0000;
red neon shadowgradient
to right
to left
to bottom left
this syntax is cool.- linear-gradient + angle is confused for me??? 180deg equals to bottom.
- the rainbowl!!!
background: linear-gradient(to left, red, orange, yellow, green, blue, indigo, violet);
background image
center fixed
is amazing.background-origin
+coutent-box/border-box/
background-clip
+coutent-box/border-box/
contain
means stretching the image until the long side fits the viewport, short side is not cover all the space of course.cover
means stretching the image until the short side fits the viewport, long side is not all showed.
CSS3
- CSS3 is latest. backward compatible.
- eclipse corner 50px/15px what does it mean?
border-radius:25px
CSS counter
increase before use or after use, is the same effect. Because it’s an interpreted language.
1
2
3
4h2::before {
content: "Section " counter(section) ": ";
counter-increment: section;
}1
2
3
4h2::before {
counter-increment: section;
content: "Section " counter(section) ": ";
}this example is confusing for me.
1
2
3
4li::before {
counter-increment: section;
content: counters(section,".") " ";
}
CSS attribute selector
a[target]
selects every<a>
element which hastarget
attribute.a[target=_blank]
the condition attribute has a value_blank
- This is a example of lots of CSS @selectors.
*=
and~=
the latter has the limit space-separated while the former is arbitary match.the defaulted blue border of
<input type="text">
looks really beautiful when correctly configured.- this animation is really cool.
1
2-webkit-transition: width 0.4s ease-in-out;
transition: width 0.4s ease-in-out;
spirit
- fucking easy!!! implement such a tech!!!!
- to the right one, need add -47px,0 .
css tooltip
- people are crazy. css draw a bubble via
border-color:black transparent transparent transparent transparent
. Then a arrow towards bottom is created.!!! Amazing~~~ border
propertytype
should not be bland. must be specified.- the content to generate the arrown should be empty
""
. I use" "
, black transparent trick doesn’t work!!! opacity: 0; transition: opacity 1s;
works. Buttransition:visibility 1s
does not work.
dropdown
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
is a CSS3 property. Giving shadows.- How to make a dropdown menu?
Define
dropdown
anddropdownContent
two classes.dropdown
need to respond to:hover
state, thendropdownContent
setdisplay:block
to make the effect dropdown.
2016.7.8
dropdown
- i can do dropdown btn;
- who can explain this for me
1
2
3
4.dropdown:hover .dropdown-content
{
}
It defines a css pseudo class:class dropdown
with a state hover
, then search the .dropdown-conten
‘s child.
- what happen if descripe an element twice? seems no matter.
body{margin:0}
hide the scroll bar white apperance.- how to implement a drop down menu in a navbar
opaque/transparency
- if div is somewhat transparent, the text in it still opaque. Of course not.
pseudo element
- really crazy. select the first line of p?? yes, that’s true. p::first-line{color:red;}
- How to store every blog’s style?
- this spicity can only be used on block element.
- ::before, seems violates ghe style philosophy. because, it insert data.
- selection is easily implemented.
pseudo class
- pseudo class can be combined with class
- hover and show hidden
- p:first-child first p.
- CSS Pseudo Elements is confused, cause there is no description.
CSS Combinators
- descendant, not class relationship,but element contained in.
- adjacent sibling is just look at the next, not the previous.
- OK general sibling is next’ next, not the previous either.
align
- inline-block is funny, it’s for convenient, and i don’t see any design philosophy.
- inline-block can make 3 a looks like navigation bar.
- the philosophy is 实用主义。
- margin has an auto value.
float
- for an horizonal list, display:inline has the same effect with float:left;
- float+margin is cool and convenient than position+left/right.
position
- static makes an element can’’t be adjusted by left, margin.
- absolute is stupid, it’ relative to the nearest element.
- element default position is relative, i think.
- z-index is empty, exist in imagination.
- z-index + position, can do the overlap.
- overflow:auto means asking the browser to scroll it ? then what’s the difference?
- cursor can be changed. just by cursor:crosshair
- text-align have effect on all the elements, even it’s an image.
- always declare the !DOCTYPE html
2016.7.7
- selector of css can be element id
- html elements can refer to more than one
class
, for example<div class="dropdown right">
div refers to two class, dropdown right. - css could use the fucking familiar slash + star things.
- link rel=”stylesheet” type=”text/css” href=”mystyle.css”
- background:red fixed right top url(“xx.jpg”); order seems not matter. but documets say order matters. color img repeat attachment position
- border’s width color type could all be specified.
- margin generates space around the elements.
- margin collapse
- powderblue is a nice color.
- we practice our self to implements designs.
- text-decoration often used to remove the underline of a link.
- oh, text-indent is just first line??? oh, yeah, if all need indent, just set the parent element.
- what’s the unit of line-height? unit of standard.
- unicode-bidi + direction == multiple languages?
- oblique is more slasher than italic.
- font family variant small-cap
- Do u know hot pink?
- tr has an state it’s hover
- overflow-x:auto; make a scroll table.
- display:none; visibility:hidden are different;
2016.7.2
- css start in style tag. css describes all the elements tags, that means
- the same tag,has the same looks.
- so it’s an convenient methods to control all the appearances of the html document.