<p>标签保持包装在图像上

时间:2015-08-24 15:54:20

标签: html css

<p>

图标宽度为85px,但是一旦我添加3 + .menu-info{text-align:center;} .menu-icon{margin-right: 10px;} 个标签,它就会开始包装并且不会居中。

uploadFile: function (file) {
var path = file.localURL,
    name = file.name,
    type = file.type;

var s3 = new AWS.S3(),
    s3_params = {
    Bucket: 'BUCKET_NAME',
    Key: name,
    Expires: 6000,
    ContentType: type,
    ACL: 'public-read'
};

s3.getSignedUrl('putObject', s3_params, function(err, data){
    if(err){
        console.log(err);
    }
    else{
        var ft = new FileTransfer(),
            url = data;

        ft.onprogress = function(progressEvent) {
            if (progressEvent.lengthComputable) {
                console.log(progressEvent.loaded / progressEvent.total);
            } else {
                console.log(progressEvent);
            }
        };

        ft.upload(
            path,
            url,
            function(result) {
                console.log('Upload success: ' + result.responseCode);
                console.log(result.bytesSent + ' bytes sent');
            },
            function(error) {
                console.log('Error uploading file ' + path + ': ' + error.code);
            },
            {
                 httpMethod  : 'PUT',
                 fileName    :  name,
                 mimeType    :  type,
                 chunkedMode :  false,
                 headers: {
                     'Content-Type' :  type,
                     'x-amz-acl'    : 'public-read'
                 }
            }
        );
    }
});

1 个答案:

答案 0 :(得分:0)

<img />标记是自动关闭的,您必须关闭<img />标记,如下所示:<img src='img' />,这是正确的HTML。如果您希望文字位于图片顶部,请使用z-indexposition: absolute