我有一个元素,其位置是绝对的,我面临的唯一问题是我已经应用了一些属性来水平居中对齐,它在mozilla上工作正常,但相同的属性不适用于chrome这里是我的代码
HTML
<a href="#section1" class="scrollTo downarrow"><img src="images/navbar_downarrow.png" class="img-responsive"/></a>
Run Code Online (Sandbox Code Playgroud)
CSS
.slider{
position: relative;
background-image: url("../images/slider.jpg");
background-size: 100% 100%;
background-repeat: no-repeat;
}
.slider a.downarrow{
position: absolute;
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;
bottom: 20px;
display: table;
}
Run Code Online (Sandbox Code Playgroud) 我需要绘制一条小垂直线,它应该出现在每个导航栏li之后.
问题是每当我尝试绘制一些东西时,导航栏就会搞砸,导航栏会进入第二行.我不能画一条垂直线.这是代码
HTML
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Double Double</title>
<link rel="shortcut icon" href="favicon.ico">
<link href='http://fonts.googleapis.com/css?family=Roboto:400,100,300,500,700%7CRoboto+Slab:400,100' rel='stylesheet' type='text/css' />
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/double.css" rel="stylesheet">
</head>
<body>
<nav class="navbar" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div style="margin: auto;display: table;">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- …Run Code Online (Sandbox Code Playgroud) 我已经在我的项目上实现了,ag-grid-vue现在我在其中一列上有一个单独的组件,基本上是Actions,现在用户可以根据选择编辑视图或删除,现在编辑和删除它工作得很好,问题是当我删除记录时,我希望通过从 Api 获取更新的数据来重新呈现表格,为此我需要从 CellRenderer 组件调用父级中的某些方法,让我向您展示代码
超文本标记语言
<ag-grid-vue
ref="agGridTable"
:components="components"
:gridOptions="gridOptions"
class="ag-theme-material w-100 my-4 ag-grid-table"
:columnDefs="columnDefs"
:defaultColDef="defaultColDef"
:rowData="accounts"
rowSelection="multiple"
colResizeDefault="shift"
:animateRows="true"
:floatingFilter="true"
:pagination="true"
:paginationPageSize="paginationPageSize"
:suppressPaginationPanel="true"
:enableRtl="$vs.rtl">
</ag-grid-vue>
Run Code Online (Sandbox Code Playgroud)
JS
import CellRendererActions from "./CellRendererActions.vue"
components: {
AgGridVue,
vSelect,
CellRendererActions,
},
columnDefs: [
{
headerName: 'Account ID',
field: '0',
filter: true,
width: 225,
pinned: 'left'
},{
headerName: 'Account Name',
field: '1',
width: 250,
filter: true,
},
{
headerName: 'Upcoming Renewal Date',
field: '2',
filter: true,
width: 250,
}, …Run Code Online (Sandbox Code Playgroud) 我正在通过java脚本设置h4的文本我想要做的是在这里添加新行代码
$("#description").text("for CCAET and has received significant international scientific recognition. <br /> \n Dr. Armogan has also been responsible for many surgical firsts in retina and cataract management.");
Run Code Online (Sandbox Code Playgroud)
现在我尝试了多种解决方案,但仍然没有在这里工作的另一个
$("#description").text("or CCAET and has received significant international scientific recognition.Dr. Armogan has also been responsible for many surgical firsts in retina and cataract management."+
"abc"+
"def");
Run Code Online (Sandbox Code Playgroud)
任何帮助?
我是JSON的新手,我有一个以数据库形式从数据库中检索到的json对象
Array
(
[0] => stdClass Object
(
[id] => 1
[data] => {"vehicle":[{"year":"2000","make":"Ac","model":"Aceca","acquired_year":"2016","acquired_month":"2","use":"Business","distance_driven_to_work_or_school":"2","distance_driven_manually":"10000"}],"first_name":"ADAS","last_name":"DSADSADA","email":"asddsa@sda.com","phone":"dsasasa","postal_code":"","drivers":[{"name":"ssada","birth_year":"2016","birth_month":"2","birth_day":"2","gender":"female","martial_status":"Single","license_number_provided":"yes","license_number":"asddasdas","license_type":"","training_completed":"","years_been_listed_on_auto_policy_in_north_america":"No Previous Experience","license_suspensions":"","accidents":"Select","convictions":"Select","cancellation_reason":"","cancellation_year":"","cancellation_month":"","cancellation_day":""}],"considering_renters_to_reduce_rate":"yes","install_winter_tires":"no","park_in_private_driveway":"yes","willing_to_install_device":"no","years_insured_with_current_company":"4 Years","how_heard_about_us":"asdaa"}
[date] => 2017-11-20 18:17:52
[status] => 0
)
)
Run Code Online (Sandbox Code Playgroud)
现在,当我尝试使用json_decode将其转换为数组时,我正在尝试获取非对象的属性这里是我的代码
<?php
echo "<pre>";
print_r($quotes); //works fine uptil here
$data = json_decode($quotes->data,true);//the error line
echo "<pre>";
print_r($data);
?>
Run Code Online (Sandbox Code Playgroud)
我尝试了几种方法,但它没有工作我尝试了一些其他的解决方案,以及最终得到错误任何帮助?
我有定价格式,其中有许多场景我必须处理!
我的基本要求是在小数点后必须有两个值,例如
20.20
100.03
30.34
Run Code Online (Sandbox Code Playgroud)
等等,现在我收到的定价类型是
30.3
25.52
100.02
Run Code Online (Sandbox Code Playgroud)
等等
现在我要构建的逻辑是,如果小数点后面有两个值,它应该按原样显示它们,不做任何改动.但是如果在小数点之后有一个值,例如30.3它应该添加一个尾随零但只有两位数!这就是我现在拥有的!
<h6> <?php $starting_from = explode('.',$result_1s['price']) ?>
$<?=round($starting_from[0])?><?=(is_numeric($result_1s['price']) && floor($result_1s['price']) != $result_1s['price']) ? '.'.$starting_from[1] :'.00' ?>
</h6>
Run Code Online (Sandbox Code Playgroud)
如何修改上面的代码,它接受我上面解释的场景.提前致谢!