fixed 2d skin preview overflow

This commit is contained in:
printempw 2016-02-05 18:53:17 +08:00
parent ef4c964fb9
commit d2cc3d2d7a
2 changed files with 12 additions and 6 deletions

View File

@ -2,7 +2,7 @@
* @Author: prpr * @Author: prpr
* @Date: 2016-01-21 19:12:06 * @Date: 2016-01-21 19:12:06
* @Last Modified by: prpr * @Last Modified by: prpr
* @Last Modified time: 2016-02-05 15:13:00 * @Last Modified time: 2016-02-05 18:50:36
*/ */
.home-menu-blur { .home-menu-blur {
@ -101,5 +101,11 @@ input[type=radio] {
position: initial !important; position: initial !important;
} }
#skinpreview > p { #skinpreview > p {
margin: 20px 0; height: 64px;
line-height: 64px;
}
.skin2d {
float: right;
max-height: 64px;
width: 64px;
} }

View File

@ -2,7 +2,7 @@
* @Author: prpr * @Author: prpr
* @Date: 2016-01-21 13:56:40 * @Date: 2016-01-21 13:56:40
* @Last Modified by: prpr * @Last Modified by: prpr
* @Last Modified time: 2016-02-05 18:34:01 * @Last Modified time: 2016-02-05 18:46:35
*/ */
'use strict'; 'use strict';
@ -70,9 +70,9 @@ $("[title='Rotation']").click(function(){
function show2dPreview() { function show2dPreview() {
$('#canvas3d').remove(); $('#canvas3d').remove();
$("#skinpreview").html($('<p>Skin for Steve model:</p>').append($('<img />').css('float', 'right').attr('src', '../skin/'+docCookies.getItem('uname')+'-steve.png'))); $("#skinpreview").html($('<p>Skin for Steve model:</p>').append($('<img />').addClass('skin2d').attr('src', '../skin/'+docCookies.getItem('uname')+'-steve.png?v='+Math.random())));
$("#skinpreview").append($('<p>Skin for Alex model:</p>').append($('<img />').css('float', 'right').attr('src', '../skin/'+docCookies.getItem('uname')+'-alex.png'))); $("#skinpreview").append($('<p>Skin for Alex model:</p>').append($('<img />').addClass('skin2d').attr('src', '../skin/'+docCookies.getItem('uname')+'-alex.png?v='+Math.random())));
$("#skinpreview").append($('<p>Cape:</p>').append($('<img />').css('float', 'right').attr('src', '../cape/'+docCookies.getItem('uname')+'.png'))); $("#skinpreview").append($('<p>Cape:</p>').append($('<img />').addClass('skin2d').attr('src', '../cape/'+docCookies.getItem('uname')+'.png?v='+Math.random())));
$('#preview').html('3D Preview').attr('href', 'javascript:show3dPreview();'); $('#preview').html('3D Preview').attr('href', 'javascript:show3dPreview();');
} }