如何使用文本换行(CSS)管理流动的动画

时间:2018-01-13 16:49:40

标签: css animation

我正在研究这个小提琴https://jsfiddle.net/wb28eeh2/260/

当我尝试在<img>内的流动图像<div>周围放置一个包装器时 我无法获得任何宽度的元素。正在尝试类似的事情:

enter image description here

图像占据了空间。我可以将文字与图像一起添加进行哪些更改?

1 个答案:

答案 0 :(得分:1)

那里有一些问题......首先,文本没有显示,因为你在//create image object from byte array BufferedImage imageobj=null; Color[][] imgcolor=null; try { imageobj=ImageIO.read(new ByteArrayInputStream(imageBytes)); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } if(imageobj!=null){ imgcolor=new Color[imageobj.getWidth()][imageobj.getHeight()]; for(int i=0;i<imageobj.getWidth();i++){ for(int j=0;j<imageobj.getHeight();j++){ imgcolor[i][j]=new Color(imageobj.getRGB(i, j)); } } } if(imgcolor!=null && imgcolor.length>0){ System.out.println("Object Color "+imgcolor[imageobj.getWidth()/2][imageobj.getHeight()/2].toString()); } 类上设置了font-size:0(可能是显示的hack:inline-block ...你最终没有真正使用)并完全忘记在.photobanner

中重置它

只需进行此更改即可显示文字

.photobanner span

https://jsfiddle.net/wb28eeh2/266/

更进一步,我认为你应该重新考虑如何制作动画以及如何构建你的html。你在那里得到了很多默认的显示模式。