图形等比自适应
头像
HTML:
<!-- 使用background-image + background-size:cover 来实现等比自适应的头像,任何怪异图形在该方法下都能铺满容器。 --> <span class="avatar"> <b class="img" style="background-image:url(http://example.com/avatar.jpg)"></b> </span>
CSS:
.avatar {display:inline-block;width:30px;height:30px;} .avatar .img { display:inline-block;width:100%;height:100%; -webkit-background-size:cover; background-size:cover; background-repeat:no-repeat; }
图片
等比自适应缩放的图形容器
实现原理基于 [老法新用]使用PADDING-TOP:(PERCENTAGE)实现响应式背景图片
实现方法可以查阅此PPT:等比的自适应图形.pptx
HTML:
<span class="img" style="background-image:url(demo.jpg)"></span>
CSS:
.img { padding-top:80%; /* width=320,height=256; padding-top = (height / width); 建议精确到小数点后4位 */ -webkit-background-size:cover; background-size:cover; }
CSS3动画
两个现成的动画库。
包含了很多基础的css3动画:淡入、淡出、弹跳进入、弹跳退出、旋转进入、旋转退出、还有一些特效,并做了兼容处理,非常实用。
Magic Animations CSS3 – Minimamente
魔法动画
动画效果更加细腻质感,包含:魔法效果、闪动、透视、旋转、幻灯、Bomb等等
I’ve read several good stuff here. Definitely worth bookmarking for revisiting. I wonder how much effort you put to make such a wonderful informative site.
It’s appropriate time to make a few plans for the future and it’s time to be happy. I’ve learn this put up and if I may just I desire to recommend you few interesting issues or tips. Perhaps you can write next articles referring to this article. I wish to read even more issues about it!
I truly treasure your work, Great post.
I think other website owners should take this web site as an example , very clean and great user pleasant pattern.
Some truly nice and useful information on this web site, likewise I believe the design and style contains great features.
I have been exploring for a little for any high-quality articles or weblog posts on this sort of space . Exploring in Yahoo I ultimately stumbled upon this website. Studying this info So i¦m satisfied to exhibit that I’ve an incredibly excellent uncanny feeling I found out exactly what I needed. I so much surely will make sure to do not disregard this site and give it a glance on a constant basis.
I would like to thnkx for the efforts you’ve put in writing this website. I am hoping the same high-grade website post from you in the upcoming also. In fact your creative writing skills has inspired me to get my own blog now. Actually the blogging is spreading its wings quickly. Your write up is a good example of it.
I like this internet site because so much useful material on here : D.
Perfectly indited subject material, Really enjoyed examining.
You made some nice points there. I looked on the internet for the topic and found most persons will agree with your site.
Hey, you used to write great, but the last few posts have been kinda boring?K I miss your great writings. Past few posts are just a little bit out of track! come on!
I enjoy the efforts you have put in this, thankyou for all the great content.
It¦s really a nice and useful piece of information. I am glad that you shared this useful info with us. Please keep us up to date like this. Thanks for sharing.
Good write-up, I am normal visitor of one¦s website, maintain up the nice operate, and It is going to be a regular visitor for a long time.
Heya i am for the first time here. I found this board and I find It truly useful & it helped me out much. I hope to give something back and help others like you helped me.
I think this is one of the most vital info for me. And i’m glad reading your article. But want to remark on some general things, The web site style is great, the articles is really excellent : D. Good job, cheers
I am not really superb with English but I get hold this rattling easygoing to read .
Very well written story. It will be valuable to everyone who usess it, including me. Keep up the good work – can’r wait to read more posts.
I was examining some of your articles on this website and I conceive this internet site is real informative! Retain posting.