我目前正在使用React Native构建测试应用程序.到目前为止,Image模块一直运行良好.
例如,如果我有一个名为的图像avatar,下面的代码片段工作正常.
<Image source={require('image!avatar')} />
Run Code Online (Sandbox Code Playgroud)
但是,如果我将其更改为动态字符串,我会得到
<Image source={require('image!' + 'avatar')} />
Run Code Online (Sandbox Code Playgroud)
我收到错误:
Requiring unknown module "image!avatar". If you are sure the module is there, try restarting the packager.
显然这是一个人为的例子,但动态图像名称很重要.React Native不支持动态图像名称吗?

为什么以下示例在Firefox 4中显示图像,但在Chrome 10和Internet Explorer 8中不显示?
HTML:
<div style="background-image: url('http://www.mypicx.com/uploadimg/1312875436_05012011_2.png')"></div>
Run Code Online (Sandbox Code Playgroud)
CSS:
div {
width: 60px;
height: 60px;
border: 1px solid black;
}
Run Code Online (Sandbox Code Playgroud)
任何解决方法的想法?