用转义序列连接两个字符串(Concatenating two strings with escape sequences)
我正在使用C#连接带有转义序列的两个字符串,我想跳过,所以我在每个字符串之前使用@符号。 它看起来像这样:
string firstString = @"Use \n for line break. "; string secondString = @"Use \b for backspace"; return firstString + secondString;
问题是:在返回的值中是否会跳过转义序列?
I am using C# to concatenate two strings with escapes sequences, that i want to skip so I'm using @ symbol before each string. It looks like this:
string firstString = @"Use \n for line break. "; string secondString = @"Use \b for backspace"; return firstString + secondString;
The question is: Will that escapes sequences be skipped in the returned value?;
原文:https://stackoverflow.com/questions/19832281
最满意答案
你可以在Selector之后使用css ::来创建这种类型的东西。
.col-sm-2::after { content: ""; position: absolute; width: 90%; height: 3px; left: 0; right: 0; margin: auto; background: #aaa; transition: all .35s; } .col-sm-2:hover::after { background: #68c122; }
这是一个小小的开始。 但我强烈建议使用
<nav class="navbar" role="navigation"></nav>
创建导航。You can use css ::after Selector for creating this type of thing.
.col-sm-2::after { content: ""; position: absolute; width: 90%; height: 3px; left: 0; right: 0; margin: auto; background: #aaa; transition: all .35s; } .col-sm-2:hover::after { background: #68c122; }
Here is a small fiddle to get started. But I strongly suggest Using
<nav class="navbar" role="navigation"></nav>
for a creating navigation.
相关问答
更多-
您需要做的就是将其添加到您的CSS: .menu-mockup .nav-tabs { border-bottom: 0; } 工作代码段: body { background-color: gray; } #home { padding: 11px; background-color: #64a3dd; color: white; border-radius: 3px; } .divider { width: 80%; } a { color: ...
-
使用border-bottom代替underline所以你可以使用填充来确定链接和下划线之间的空间量,如下所示: HTML:CSS: #menu a { color: #FFF; background-color: #252525; te ...
-
你是这个意思吗? 将净资产值保持在150,但将其悬停在直接位于链接下方。 @media (min-width: 768px) { .navbar-default .navbar-brand, .navbar-default .navbar-nav li a { background-color: #FFFFFF; } .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li ...
-
将边框应用于标签中a的伪元素,使用position: absolute定位,并使用left值和right值来说明该元素的填充情况,以便边框与文本对齐。 .nav>li>a:after { content: ''; border-bottom: 1px solid red; position: absolute; bottom: 0; left: 15px; right: 15px; } /* you don't need this - just for the demo */ ...
-
您可以将padding重置为0或减少值。 并使用margin再次调整间距。 .navbar-default .navbar-nav > li > a { color: #333; border-bottom: 1px solid transparent; padding: 0; /*removing spacing*/ margin: 14px; /*add spacing*/ } You can reset the padding to 0 or decrease the values. ...
-
您可以使用printf "%-42s"将带有空格的字符串对齐到42个字符。 您可以使用$COLUMNS获取窗口宽度。 将它们放在一起,我们得到: printf "\033[1;4;31m%-${COLUMNS}s\033[00m" "Command failed with $RANDOM" 无论(这里是随机的)数字是多少位数,该线总是一直延伸到边缘。 You can left align a string with spaces to 42 characters with printf "%-42s". ...
-
Bootstrap导航栏如何用两侧带空格的线加下划线?(Bootstrap navbar how can i underline with a line with spaces in both sides?)[2022-05-13]
你可以在Selector之后使用css ::来创建这种类型的东西。 .col-sm-2::after { content: ""; position: absolute; width: 90%; height: 3px; left: 0; right: 0; margin: auto; background: #aaa; transition: all .35s; } .col-sm-2:hover::after { backg ... -
如果您不需要手动添加换行符,则可以设置悬挂缩进。 链接不会强调这一点。 更改您的HTML如下: Neuropsychological Assessment
... -
活动时为导航栏添加下划线(Underline navbar when active)[2022-05-18]
你确定你有.active类吗? 我在Web控制台.active不到任何.active 。 我在源代码中看到它是: .current-menu-item 所以你可以这样做: .current-menu-item { text-decoration: underline; /* add other style if you want. */ } Are you sure you have an .active class ? I don't see any .active in the w ... -
只需将锚点填充移至li即可。 这是相同的自定义css。 .navbar-nav.nav-underline>li>a { padding: 0px; } .navbar-nav.nav-underline>li { padding: 15px; } 以下是工作示例: .nav-underline a { border-bottom: transparent solid 2px; padding-bottom: 40px; } .nav-underline a:hover { ...