Мини-профиль с 3D эффектом разворачивания кнопок на CSS3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
@import"//netdna.bootstrapcdn.com/font-awesome/3.0/css/font-awesome.css"; @import url(http://fonts.googleapis.com/css?family=Open+Sans); ul, li { margin: 0; padding: 0; list-style-type: none; } .container { margin: 40px auto 0; width: 143px; } .profile-container { position: relative; width: 143px; float: left; } .profile { background: #f6f6f6; float: left; padding: 4px; border-radius: 3px; -o-border-radius: 3px; -ms-border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -ms-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; } .avatar img { display: block; border-radius: 3px; -o-border-radius: 3px; -ms-border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; } .follow { margin: 4px 0 0 0; } .follow button { display: block; width: 100%; border: 0; background: #268cde; color: white; padding: 7px 0; margin: 0; border-radius: 3px; -o-border-radius: 3px; -ms-border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -ms-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; cursor: pointer; } .follow button i { font-size: 10px; color: #b9daf4; } .follow button:hover { background: #3096e8; } .follow button:active { background: #2085d6; } .profile-list { overflow: hidden; width: 100%; box-sizing: border-box; color: #767b7e; font-size: 13px; } .profile-list li { cursor: pointer; background: #ffffff; border-top: 1px solid #e5e6e6; padding: 15px 10px; } .profile-list li:last-child { border-radius: 0 0 3px 3px; ; -o-border-radius: 0 0 3px 3px; -ms-border-radius: 0 0 3px 3px; -moz-border-radius: 0 0 3px 3px; -webkit-border-radius: 0 0 3px 3px; } .profile-list li[class^="icon-"] { margin: 0 3px 0 0; } .profile-list .profile { border-radius: 3px 3px 0 0; position: relative; } .profile-list li { -webkit-transform-origin: 50% 0%; -o-transform-origin: 50% 0%; transform-origin: 50% 0%; -webkit-transform: perspective(250px) rotateX(-90deg); -o-transform: perspective(250px) rotateX(-90deg); transform: perspective(250px) rotateX(-90deg); -moz-box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.05); } .profile-list .first { -webkit-transition: 0.2s linear 0.8s; -o-transition: 0.2s linear 0.8s; transition: 0.2s linear 0.8s; } .profile-list .second { -webkit-transition: 0.2s linear 0.6s; -o-transition: 0.2s linear 0.6s; transition: 0.2s linear 0.6s; } .profile-list .third { -webkit-transition: 0.2s linear 0.4s; -o-transition: 0.2s linear 0.4s; transition: 0.2s linear 0.4s; } .profile-list .fourth { -webkit-transition: 0.2s linear 0.2s; -o-transition: 0.2s linear 0.2s; transition: 0.2s linear 0.2s; } .profile-container:hover .profile { border-radius: 3px 3px 0 0; -o-border-radius: 3px 3px 0 0; -ms-border-radius: 3px 3px 0 0; -moz-border-radius: 3px 3px 0 0; -webkit-border-radius: 3px 3px 0 0; } .profile-container:hover .profile-list li { -webkit-transform: perspective(350px) rotateX(0deg); -o-transform: perspective(350px) rotateX(0deg); transform: perspective(350px) rotateX(0deg); -webkit-transition: 0.2s linear 0s; -o-transition: 0.2s linear 0s; transition: 0.2s linear 0s; } .profile-container:hover .profile-list .second { -webkit-transition-delay: 0.2s; -o-transition-delay: 0.2s; transition-delay: 0.2s; } .profile-container:hover .profile-list .third { -webkit-transition-delay: 0.4s; -o-transition-delay: 0.4s; transition-delay: 0.4s; } .profile-container:hover .profile-list .fourth { transition-delay: 0.6s; -o-transition-delay: 0.6s; transition-delay: 0.6s; } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<div class="container"> <div class="profile-container unfold"> <div class="profile"> <div class="avatar"><img src="Ссылка_на_картинку_профиля" width="135px" /></div> <div class="follow"><button><i class="icon-plus"></i> Подписаться</button></div> </div> <ul class="profile-list"> <li class="first"><i class="icon-user"></i> Профиль</li> <li class="second"><i class="icon-list-alt"></i> Активность</li> <li class="third"><i class="icon-time"></i> Друзья</li> <li class="fourth"><i class="icon-heart"></i> Избранное</li> </ul> </div> </div> |
Мерси,забрал себе .Все клева.Совсем не много переделал.
Рад, что пригодилось 🙂