2016-01-13 109 views
0

我有一个图像我想旋转透明,当我的屏幕被阻止。默认情况下有一个白色框作为消息CSS。不知道如何实现这一点。jquery BlockUI - 透明加载图像

来源:查看源代码:http://malsup.com/jquery/block/#demos

本节在这里创建图像周围的白色盒子。

$.blockUI({ message: '<h1><img src="./images/loading.gif" /></h1>' 

如果我评论这部分源代码,整个图像消失。

css: { 
    padding:   0, 
    margin:   0, 
    width:   '30%', 
    top:    '40%', 
    left:   '35%', 
    textAlign:  'center', 
    color:   '#000', 
    border:   '3px solid #aaa', 
    backgroundColor: '#fff', 
    cursor:   'wait' 
}, 
+0

'的backgroundColor:'#fff'' ...? – CBroe

+0

你可以创建一个小提琴来演示这个问题吗? – AtheistP3ace

回答

2

试试这个:

css: { 
    backgroundColor: 'transparent', 
    border: '0' 
}, 

例如小提琴:https://jsfiddle.net/johnboker/ft3vwn2f/

+0

我现在试试这个 –

+0

嘿,这是工作.... –

+0

我很高兴我可以帮助。 –