js动态背景(蜘蛛网特效)

index.html

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title>随心网</title>

<script src="jquery.min.js"></script>

<style>

body, html {

position: absolute;

top: 0;

bottom: 0;

left: 0;

right: 0;

margin: 0;

padding: 0;

background-color:#456;

z-index: -100;

}

</style>

</head>

<body>

<div style="float:right;" id="hub_iframe"></div>

<div style="margin: 500px; color: #fff; font-size: 20px;">

点击进入:<a href="resume/WebContent/login.jsp">随心简历网</a>

</div>

<script type="text/javascript" color="255,255,255" opacity='2' 

zIndex="-99" count="150" src="canvas-nest.js"></script>

</body>

</html>


  • 1
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
QCustomPlot 是一个 C++ 图形绘图库,它提供了丰富的绘图功能,包括曲线图、散点图、柱状图、等值线图等。QCustomPlot 也支持绘制雷达图(蜘蛛网图)。 在 QCustomPlot 中,绘制雷达图需要使用 QCPGraph 类。该类提供了 setLineStyle、setScatterStyle、setData 等方法用于设置线型、散点和数据等属性。具体绘制步骤如下: 1. 创建一个 QCustomPlot 实例并设置其大小和背景色。 2. 创建一个 QCPGraph 实例并设置其线型、散点和数据等属性。 3. 创建一个 QCPAxisRect 实例并将其与 QCustomPlot 关联。 4. 创建一个 QCPAxis 实例并将其与 QCPAxisRect 关联,用于设置雷达图的轴线。 5. 使用 QCustomPlot 的 addPlottable 方法将 QCPGraph 添加到 QCustomPlot 中。 6. 最后,调用 QCustomPlot 的 replot 方法刷新绘图。 下面是一个简单的 QCustomPlot 绘制雷达图的示例代码: ```cpp // 创建 QCustomPlot 实例并设置其大小和背景色 QCustomPlot *customPlot = new QCustomPlot(this); customPlot->setGeometry(10, 10, 400, 400); customPlot->setBackground(QBrush(Qt::white)); // 创建 QCPGraph 实例并设置其线型、散点和数据等属性 QVector<double> data = {1, 3, 2, 4, 5}; QCPGraph *graph = new QCPGraph(customPlot->xAxis, customPlot->yAxis); graph->setLineStyle(QCPGraph::lsLine); graph->setScatterStyle(QCPScatterStyle::ssCircle); graph->setData(QVector<double>({0, 1, 2, 3, 4}), data); // 创建 QCPAxisRect 实例并将其与 QCustomPlot 关联 QCPAxisRect *axisRect = new QCPAxisRect(customPlot); customPlot->plotLayout()->addElement(0, 0, axisRect); // 创建 QCPAxis 实例并将其与 QCPAxisRect 关联 QCPAxis *axis = new QCPAxis(axisRect, QCPAxis::AxisType::atPolar); axis->setRange(0, 5); axis->setTickStep(1); axis->setSubTickCount(4); axis->grid()->setVisible(true); axisRect->addAxis(QCPAxis::atLeft, axis); // 将 QCPGraph 添加到 QCustomPlot 中 customPlot->addPlottable(graph); // 刷新绘图 customPlot->replot(); ``` 上述代码将绘制一个简单的雷达图,其中包含一个 QCPGraph 对象,使用折线和圆圈表示数据点,使用 QCPAxisRect 和 QCPAxis 对象设置雷达图的轴线。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值