Good because this blog is also my catch-all, here's a ticket that has nothing to do with my previous articles. Here is a short tutorial HTML / CSS, for those who have trouble making their web site neat and efficient.
And yes I am a big fan of the opportunities brought by the CSS3. In two lines it is possible to round a block and it put a shadow which avoids tedious work in Photoshop or Gimp. Unfortunately besides the fact that CSS3 is not yet fully run in all browsers, that we should add "-webkit" and "-moz" for each supported browser interprets ... Well not yet consumes CSS3 lot of resources. If you intend to make a block scalable and that premium is animated, chances are that your animation lacks fluidity, especially on the shelves and smartphones. So here's a basic tutorial that will show you one option among many other activities to create a block with rounded edges, variable in size, and animated so perfectly smooth.
first carried round your block in your favorite drawing software.
Art in the realization of a block of variable size lies in the properties and repeat-x repeat-y CSS. there are areas in the borders that will be duplicated according to these two axes. For my part I created a block with a gradient up to a certain level, I could not place my area of duplication or good I thought.
Arrange so the rules that will delimit the different portions of the block. If you want the block size varies only on one axis, so cut your block into 3 pieces and not 9 as I did. The central part of the block, which will be duplicated must always be as "thin" as possible, the move 1 pixel. Once your rules positioned just start cutting, make a file for each song. Warning some piece must be the same height or width under penalty of being staggered.
Once done cutting, you have to get serious and put the hand in the code.
Encode me a pretty picture, 3 or 9 box with the number of axis that you want to vary the size. In each box, put the size of your image and the image in question in the background. At the end do not forget to bring the style of margin and padding to 0, on pain of having gaps between the boxes.
Voila, you are normally and to vary the size of this block, it just have to play on the size of the central cell of your table.
- it is all well and good but where I put my content in that block?
Ahah, indeed, the trick lies in creating a block "div" below your pretty picture, and then assign a negative margin-top for the back and front of your table overlay. Put your content in this block and do not forget to add a style "position: relative;" that IE does not make its crisis.
0 comments:
Post a Comment