我有一个输入和一个 div,其高度和宽度等于输入的边框底部。我只想显示首先隐藏的div。
.cool{
font-size: 30px;
margin: auto;
outline: none;
padding-bottom: 0.2em;
border-width: 0px 0px 2px 0px;
border-bottom-color: black;
}
div.bar{
width: 365.3px;
height: 2px;
background-color: #42c0fb;
position: relative;
top: -2px;
display: none;
}
input:focus .bar{
display: block
}Run Code Online (Sandbox Code Playgroud)
<div style = "margin: auto;">
<input class = "cool" type = "text" />
<div class = "bar"></div>
</div>Run Code Online (Sandbox Code Playgroud)
请帮忙。上面的代码不起作用。
我正在使用VueJS创建注册表格!用户必须输入他/她的出生日期。
那么,如何在<select>元素中生成从1900到当前年份的年份呢?
我尝试了这个:
new Vue ({
el: '.container',
methods: {
getCurrentYear() {
return new Date().getFullYear();
}
}
});Run Code Online (Sandbox Code Playgroud)
<div class="container">
<select id="dob">
<option value="0">Year:</option>
<option v-for="year in getCurrentYear()" :value="year">{{ year }}</option>
</select>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.16/vue.js"></script>Run Code Online (Sandbox Code Playgroud)
但是,在这种情况下,年份从1开始。那么,我该如何循环浏览<option>从1900年开始的年份?
我正在创建一个DOB表单.
我在表单中使用VueJS.用户应该首先显示月份日期,以便根据相应月份的天数显示该日期.
我正在使用filter(),this内部的问题filter()是未定义的.我怎样才能解决这个问题?
new Vue ({
el: '.app',
data: {
months: [
{month: 'January', days: 31},
{month: 'February', days: 28},
{month: 'March', days: 31},
{month: 'April', days: 30},
{month: 'May', days: 31},
{month: 'June', days: 30},
{month: 'July', days: 31},
{month: 'August', days: 31},
{month: 'September', days: 30},
{month: 'October', days: 31},
{month: 'November', days: 30},
{month: 'December', days: 31},
],
selectedMonth: []
},
computed: {
filterDays() {
return this.months.filter(function(value) {
return value.month === …Run Code Online (Sandbox Code Playgroud)我在我的项目中使用 Bulma。
基本上,我正在尝试height: 25em使用 Bulma将 text 和 image( ) 内联。但它没有发生。
到目前为止,我试过这个:
.img-cont {
width: 50%;
float: left;
}
img {
height: 25em;
}
.clearfix {
clear: left;
}
.content {
float: right;
}Run Code Online (Sandbox Code Playgroud)
<link href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.6.2/css/bulma.min.css" type="text/css" rel="stylesheet">
<div class="container is-info">
<div class="img-cont">
<img src="https://i.imgur.com/Pyp4DwX.png" alt="">
</div>
<div class="clearfix"></div>
<div class="content has-text-centered">
<span class="title">MEDAL</span><br>
<span class="subtitle">Loren Ipsum Dolar Sit Amet.</span>
</div>
</div>Run Code Online (Sandbox Code Playgroud)
正如您所看到的,文本内容不会垂直居中,而是始终位于底部。
那么,我该如何解决这个问题并实现我想要的外观呢?
我正在使用Sublime Text 3 Build3154。我当前正在使用Material Theme UI Darker。问题是我不知道使背景颜色(我们编码的区域)更暗。请帮我怎么做?我为侧边栏,状态栏和标题栏启用了对比模式。我想使我们编码的背景颜色与对比模式相同。请帮忙。
我的Sublime Text 3的设置:
{
"always_show_minimap_viewport": true,
"background": "red",
"bold_folder_labels": true,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme",
"font_size": 16,
"highlight_line": true,
"ignored_packages":
[
"Material Theme - Appbar",
"Theme - Dark Material",
"Vintage"
],
"indent_guide_options":
[
"draw_normal",
"draw_active"
],
"line_padding_bottom": 7,
"line_padding_top": 7,
"material_theme_accent_scrollbars": true,
"material_theme_accent_yellow": true,
"material_theme_big_fileicons": true,
"material_theme_bold_tab": true,
"material_theme_bullet_tree_indicator": true,
"material_theme_contrast_mode": true,
"material_theme_small_statusbar": true,
"overlay_scroll_bars": "enabled",
"theme": "Material-Theme-Darker.sublime-theme"
}
Run Code Online (Sandbox Code Playgroud)
请帮我。我正在使用最新版本的Material Theme