Test css counter
How do I make an test css counter?
Build tree with angular, show counter with css.. What is a test css counter? How do you make a test css counter? This script and codes were developed by TabSpace on 22 November 2022, Tuesday.
Test css counter - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>test css counter</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <script id="others_angular_103" type="text/javascript" class="library" src="https://lib.sinaapp.com/js/angular.js/angular-1.2.19/angular.min.js"></script>
<div ng-app="myapp"> <div class="ng-cloak" ng-cloak> <div ng-controller="tree" id="tree"> <tree family="mytree"></tree> </div> <div ng-controller="list" style="margin-top:30px;" id="list"> <ul> <li ng-repeat="item in items">{{item.text}}</li> </ul> </div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/angular.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Test css counter - Script Codes CSS Codes
body{margin:0;padding:0;background:#fff;color:000;}
p,ul,li{list-style:none;margin:0;padding:0;}
ul{padding-left:40px;}
[ng-cloak], .ng-cloak {display: none;}
#tree tree>ul{counter-reset:tree;}
#tree tree>ul>li{counter-increment: tree;}
#tree li>tree>p:before{content:counters(tree, '-') '. '; color:#0a0; font-size: 12px;}
#list ul{counter-reset:list;}
#list li:before{content:counter(list) '. '; color:#0a0; font-size: 12px;counter-increment: list;}
Test css counter - Script Codes JS Codes
var module = angular.module('myapp', []);
module.directive("tree", function($compile) { return { restrict: "E", scope: {family: '='}, template: [ '<p>{{family.text}}</p>', '<ul>', '<li ng-repeat="item in family.items">', '<tree family="item"></tree>', '</li>', '</ul>' ].join(''), compile: function(tElement, tAttr) { var contents = tElement.contents().remove(); var compiledContents; return function(scope, iElement, iAttr) { if(!compiledContents) { compiledContents = $compile(contents); } compiledContents(scope, function(clone, scope) { iElement.append(clone); }); }; } };
});
module.controller("tree", function($scope) { var items = [ {}, { items : [ {}, { items : [{}, {}] }, { items : [{}, {}] }, { items : [ {}, { items : [{}, {}, {}] }, { items : [{}, {}] } ] }, {}, {} ] }, {}, {} ]; var fill = function(list, level){ level = level || 1; list.forEach(function(item, index){ item = item || {}; item.text = 'level:' + level + '; index:' + index; if(Array.isArray(item.items)){ fill(item.items, level + 1); } }); }; fill(items); $scope.mytree = { text : 'tree root', items : items }; console.log($scope.mytree);
});
module.controller("list", function($scope) { var items = []; for(var i = 0; i < 10; i++){ items.push({text : 'item index:' + i}); } $scope.items = items;
});
Developer | TabSpace |
Username | tabspace |
Uploaded | November 22, 2022 |
Rating | 3 |
Size | 2,547 Kb |
Views | 18,216 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Gift Card | 13,575 Kb |
Gradient-ticket-transparent | 1,589 Kb |
Gradient-apple-logo | 1,859 Kb |
Gradient-ticket | 1,501 Kb |
Gradient-demo-wave-fx | 1,942 Kb |
Iscroll-select-base | 2,901 Kb |
Gradient-purecss-card | 2,391 Kb |
Gradient-ui-button | 1,829 Kb |
Gradient-mask-image | 1,603 Kb |
Gradient-demo-card | 1,560 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
A Pen by Bryan | Brydave | 2,286 Kb |
CSS Heart Loaders | Nourabusoud | 2,161 Kb |
Background Images | Jooonebug | 2,100 Kb |
Button fills | Zubfatal | 5,205 Kb |
Flat UI Button | Honchoman | 2,289 Kb |
CSS Variables | Jdsteinbach | 4,759 Kb |
Another brick in the wall | Fivera | 1,955 Kb |
Profile box | Daniesy | 2,766 Kb |
SnappySnippet Test | Elmsoftware | 8,385 Kb |
Canvas Orbital Trails v2 | Jackrugile | 3,421 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!