小编vip*_*pin的帖子

bootstrap.css和bootstrap-combined.min.css有什么区别?

我正在使用bootstrap.css,我发现还有另一个名为bootstrap-combined.min.css的 css文件,风格有什么不同吗?是否需要包含两个css文件?哪个更优选?

css twitter-bootstrap-2

21
推荐指数
1
解决办法
2万
查看次数

如何将css应用于悬停其中一个的三个不同类

这是我的代码.

<div class="start">start</div>
<div>middle-1</div>
<div>middle-2</div>
<div>middle-3</div>
...................
...................
<div>middle-n</div>
<div class="end">end</div>
Run Code Online (Sandbox Code Playgroud)

当鼠标悬停在第一个div的class start时,我想将css应用于所有div.

html css

9
推荐指数
1
解决办法
446
查看次数

d3.js错误:<g>属性transform ="translate(NaN,5)"的值无效

我正在使用nvd3.js和angularjs,这是代码.

<nvd3-pie-chart data="exampleData1"
      class="pie"
      id="labelTypePercentExample"
      x="xFunction()"
      y="yFunction()"
      showLabels="true"
      pieLabelsOutside="true"
      showLegend="true"
      labelType="percent">
  </nvd3-pie-chart>
Run Code Online (Sandbox Code Playgroud)

和js是.

myapp.controller('ExampleCtrl1',function($scope,$timeout){
  $scope.exampleData1 = [
    { key: "Ongoing", y: 20 },
    { key: "completed", y: 0 }
  ];
 $timeout(function() {
   $scope.exampleData1 = [
    { key: "Ongoing", y: 20 },
    { key: "completed", y: 2 }
   ];
 }, 10);
 $scope.xFunction = function(){
   return function(d) {
   return d.key;
   };
 }
 $scope.yFunction = function(){
   return function(d) {
   return d.y;
  };
 }
})
Run Code Online (Sandbox Code Playgroud)

并且在页面调整大小时抛出错误.

错误:属性变换的值无效="translate(NaN,5)" d3.js:590

d3.js angularjs nvd3.js

9
推荐指数
1
解决办法
9984
查看次数

如何在nvd3饼图的工具提示中获得百分比?

我有一个nvd3饼图.我获取百分比值作为标签,但我想在工具提示中.这是HTML:

<nvd3-pie-chart data="Data1"id="labelTypePercentExample"
      width="550"
      height="350"
      x="xFunction()"
      y="yFunction()"
      showLabels="true"
      pieLabelsOutside="false"
      tooltips="true"
      tooltipcontent="toolTipContentFunction()"
      labelType="percent"
      showLegend="true">
  </nvd3-pie-chart>
Run Code Online (Sandbox Code Playgroud)

数据

Data1=[{ key: "Ongoing", y: 20 },
       { key: "completed", y: 0 }];
Run Code Online (Sandbox Code Playgroud)

这是用于将键显示为工具提示数据的工具提示功能.

$scope.toolTipContentFunction = function(){
    return function(key, x, y, e, graph) {
       return '<h1>' + key + '</h1>'
    }
}
Run Code Online (Sandbox Code Playgroud)

javascript svg d3.js pie-chart nvd3.js

8
推荐指数
1
解决办法
3633
查看次数