我想知道使用HTML标签的优点和缺点是什么,而不是使用Javascript实现相同的滚动文本效果?
是否<marquee>
鼓励使用HTML标签?
我在任何地方都找不到;我可能会用错误的关键字找到它。
图片描绘了一千个字,让我解释一下。
假设我们有一组未知数量的字符串:
String hello = "Hello world\n Welcome\n"
String goodbye = "Goodbye\n See you in the next life\n"
String do = "Do something\n Be part of us\n"
Run Code Online (Sandbox Code Playgroud)
我想要一个产生这样结果的函数:
String hellogoodbyedo = "
Hello world_________________Goodbye________________________Do Something\n
Welcome_____________________See you in the next life_______Be part of us\n"
Run Code Online (Sandbox Code Playgroud)
其中_表示空格。有这样做的聪明方法吗?