我想更改工具提示的样式(来自tippy.js),并且完全按照此处文档中的说明进行操作:
Themes are created by including a class on the tippy-tooltip element as part of a selector in the form .tippy-tooltip.x-theme. Let's demonstrate this by creating our own theme called tomato:
.tippy-tooltip.tomato-theme {
background-color: tomato;
color: yellow;
}
To apply the theme, specify a theme prop without the -theme suffix:
tippy('button', {
theme: 'tomato',
});
Run Code Online (Sandbox Code Playgroud)
但由于某种原因,我的工具提示保持默认颜色,为什么?
我添加了这个样式:
.tippy-tooltip.tomato-theme {
background-color: tomato;
color: yellow;
}
.infosvg {
width: 20px;
}
tooltippy {
position: absolute;
top: 150px;
left: 300px;
}
Run Code Online (Sandbox Code Playgroud)
我的网页
<span …
Run Code Online (Sandbox Code Playgroud) 我正在使用Bootstrap 的模态插件,由于某种原因,背景没有显示。
当我在 W3Schools 上检查相同的代码时,我注意到div
每次打开模式时都会生成 a :
<div class="modal-backdrop fade in"></div>
Run Code Online (Sandbox Code Playgroud)
我得到了与 W3Schools 上完全相同的代码,但这div
不是在我的网站上生成的。
我该如何解决这个问题?
我正在尝试更新数据库中与彼此链接的三个表.
我的表格设置如下:
模板
id
title
id_company
Run Code Online (Sandbox Code Playgroud)
questioncat
id
title
ordering
tid (id of templates)
Run Code Online (Sandbox Code Playgroud)
问题
id
question
catid (id of questioncat)
ordering
Run Code Online (Sandbox Code Playgroud)
templates
包含我的问题列表的名称,questioncat
包含列表中的所有类别,并questions
包含属于某个类别的所有问题.
插入该数据工作正常,我这样做:
首先我的PHP脚本获取一个数组,例如如下所示:
Array
(
[0] => Array
(
[name] => lijsttitle
[value] => Lijst nieuw
)
[1] => Array
(
[name] => category[]
[value] => cat1
)
[2] => Array
(
[name] => sortorder
[value] => 1
)
[3] => Array
(
[name] => question[]
[value] => q1
)
[4] => Array …
Run Code Online (Sandbox Code Playgroud) 我正在循环一组具有相同类的元素。现在,当单击一个元素时,我需要它来获取一个使其处于活动状态的类并为其添加一些 css。这有效但它永远存在,所以如果我点击 4 个元素,我有 4 个活动元素。
单击 1 时,我试图从所有同级元素中删除该类,但以下代码由于某种原因不起作用:
$('.klantenblokje').each(function(i, obj) {
$(this).on("click", function(e){
e.preventDefault();
var id = $(this).attr('id');
$(this).addClass('activeblok');
$(this).siblings().removeClass('activeblok');
});
});
Run Code Online (Sandbox Code Playgroud)
我也试过:
$('.klantenblokje').each(function(i, obj) {
$(this).on("click", function(e){
e.preventDefault();
var id = $(this).attr('id');
$(this).addClass('activeblok').siblings().removeClass('activeblok');
});
});
Run Code Online (Sandbox Code Playgroud)
为什么不起作用?单击时会添加该类,但对于兄弟姐妹,没有删除任何内容。
如果有帮助,我的 HTML:
<div class="col-md-2 col-6">
<a href="#bezorgen" id="bezorgen" class="klantenblokje">
<i class="icon-transport"></i>
<span>Bezorgen</span>
</a>
</div>
<div class="col-md-2 col-6">
<a href="#bestellen" id="bestellen" class="klantenblokje">
<i class="icon-cart"></i>
<span>Bestellen</span>
</a>
</div>
<div class="col-md-2 col-6">
<a href="#betalen" id="betalen" class="klantenblokje">
<i class="icon-euro"></i>
<span>Betalen</span>
</a>
</div>
<div class="col-md-2 col-6">
<a …
Run Code Online (Sandbox Code Playgroud) 我有一个表单,可以通过单击按钮添加行。它们也可以通过点击删除。
\n我的页面加载 html 如下所示:
\n<div class="invoicerow">\n <div class="row">\n <div class="col-12 col-md-2">\n <label for="">Aantal</label>\n <div class="inputstyle mb-10">\n <input type="text" name="invoice_row[][invoice_quantity]">\n </div>\n </div>\n <div class="col-12 col-md-5">\n <label for="">Titel</label>\n <div class="inputstyle mb-10">\n <input type="text" name="invoice_row[][invoice_title]">\n </div>\n </div>\n <div class="col-12 col-md-2">\n <label for="">Prijs</label>\n <div class="inputstyle mb-10">\n <input type="text" name="invoice_row[][invoice_price]">\n </div>\n </div>\n <div class="col-12 col-md-2">\n <label for="">Totaal</label>\n <div>\xe2\x82\xac99,05</div>\n </div>\n <div class="col-12 col-md-1 d-flex align-center">\n <i class="fas fa-trash-alt delete_invoice_row"></i>\n </div>\n <div class="col-12">\n <label for="">Beschrijving</label>\n <div class="inputstyle mb-10">\n <textarea type="text" name="invoice_row[][invoice_desc]"></textarea>\n </div>\n </div>\n </div>\n</div>\n
Run Code Online (Sandbox Code Playgroud)\n … 如何dropdownlist
在datatables
插件的搜索字段旁边添加一个?
在插件初始化的外部添加一个并将其放置在内部太脏了。应该可以添加自定义下拉列表对吗?它不必是动态的,只是一个带有一些值的下拉列表。
我怎样才能做到这一点 ?
<script>
$(document).ready(function(){
$('#myTable').DataTable({
"language": {
"sProcessing": "Bezig...",
"sLengthMenu": "_MENU_ resultaten weergeven",
"sZeroRecords": "Geen resultaten gevonden",
"sInfo": "_START_ tot _END_ van _TOTAL_ resultaten",
"sInfoEmpty": "Geen resultaten om weer te geven",
"sInfoFiltered": " (gefilterd uit _MAX_ resultaten)",
"sInfoPostFix": "",
"sSearch": "Werknemers zoeken :",
"searchPlaceholder": "Naam/BSN/Personeelsnr",
"sEmptyTable": "Geen resultaten aanwezig in de tabel",
"sInfoThousands": ".",
"sLoadingRecords": "Een moment geduld aub - bezig met laden...",
"oPaginate": {
"sFirst": "Eerste",
"sLast": "Laatste",
"sNext": "Volgende",
"sPrevious": "Vorige" …
Run Code Online (Sandbox Code Playgroud) 我试图在css中复制一个应该是可能的图像.但是阴影/半径越来越小,用css几乎无法察觉.如何增加强度/半径?
我希望如何:
如何使用css(当我增加半径时,它变得几乎不可察觉):
我的代码:
text-shadow: 0px 0px 10px #fff;
Run Code Online (Sandbox Code Playgroud) 我想在Google Page Speed Insights上获得100/100分.但它一直告诉我一些css文件阻止了首屏内容.如何在加载主要内容后确保加载这些文件?因此,它不再出现在Page Speed Insights中.
我尝试使用jquery异步加载文件,但这样消息仍然会弹出页面速度工具.
我尝试了以下方法:
<script>
var loadMultipleCss = function(){
//load local stylesheet
loadCss('myawesomestyle.css');
//load Bootstrap from CDN
loadCss('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css');
//load Bootstrap theme from CDN
loadCss('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css');
}
var loadCss = function(cssPath){
var cssLink = document.createElement('link');
cssLink.rel = 'stylesheet';
cssLink.href = cssPath;
var head = document.getElementsByTagName('head')[0];
head.parentNode.insertBefore(cssLink, head);
};
//call function on window load
window.addEventListener('load', loadMultipleCss);
</script>
Run Code Online (Sandbox Code Playgroud)
用我自己的文件路径.
但对于Google PageSpeed Insights,这不起作用.
是否可以使用引导程序创建10列布局? col-md-1
给出12并col-md-2
给出6,但我需要10.我怎样才能实现呢?这有什么css"hacks"吗?
我正在考虑在彼此旁边粘贴2个5列网格(来自这个问题/答案),但我不确定如何处理它.
我循环一些标记并添加一个lat和long给他们但我一直收到这个错误:
message
:
"not a LatLng or LatLngLiteral: not an Object"
name
:
"InvalidValueError"
Run Code Online (Sandbox Code Playgroud)
和:
InvalidValueError: setPosition: not a LatLng or LatLngLiteral: in property lat: not a number
Run Code Online (Sandbox Code Playgroud)
这是我的循环:
var bedrijvenlijst = []; // new array
$.each( bedrijven, function( key, value ) {
// console.log( key + ": " + value.plaats );
console.log(value.lng);
bedrijvenlijst.push({
title : value.title,
image : 'bbvdw.jpg',
address : value.straat + ' ' + value.plaats,
position : {
lat : value.lat,
lng : value.lng
},
markerIcon : …
Run Code Online (Sandbox Code Playgroud) javascript ×7
jquery ×7
css ×3
html ×3
arrays ×2
css3 ×1
database ×1
datatables ×1
google-maps ×1
php ×1
sql ×1