如何在字符串生成器中使用样式标记? [英] How to use style tag inside string builder?
本文介绍了如何在字符串生成器中使用样式标记?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
_bodyBuilder.AppendLine(< div>< a style = \text-decoration:\none \; border:\1px solid#333 \ ; href =''>添加到日历< img height ='25'width ='25'src ='calendar.png'alt ='logo'/>< / a>< / div>) ;
我的尝试:
嗨!我很难在标签中应用样式。我试图在计划html中使用样式但我不知道如何在使用StringBuilder时使用样式。
解决方案
_bodyBuilder.AppendLine(< div>< a style = \text-decoration:none; border:1px solid#333; \href =''>添加到日历< img height ='25'width ='25'src ='calendar.png'alt ='logo'/>< / a>< ; / div>);
试试这个
_bodyBuilder.AppendLine(< div > < a style = text-decoration:none; border:1px; solid:#333 href =' ' > 添加到日历< img height =' 25' width =' 25' src =' calendar.png' alt =' 徽标' / > < / a > ; < / div > < /跨度>);
_bodyBuilder.AppendLine("<div> <a style=\"text-decoration:\"none\";border:\"1px solid #333\"; href ='' >Add to Calendar<img height ='25' width='25' src='calendar.png' alt='logo' /></ a ></div>");
What I have tried:
Hi! I am having hard time to apply style inside the tag. i tried to use style as we use in plan html but I dont know how to use style when you use StringBuilder.
解决方案
_bodyBuilder.AppendLine("<div> <a style=\"text-decoration:none;border:1px solid #333;\" href ='' >Add to Calendar<img height ='25' width='25' src='calendar.png' alt='logo' /></ a ></div>");
Try this
_bodyBuilder.AppendLine("<div> <a style="text-decoration:none;border:1px ;solid:#333" href=''>Add to Calendar<img height='25' width='25' src='calendar.png' alt='logo' /></a></div>");
这篇关于如何在字符串生成器中使用样式标记?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文